You need a proper combination of both.
Practice but no matches: you will become the club Federer with elegant style but will lose to a pusher in a real match and come crying here.
Matches, but no practice: you will learn how to win, but your level will remain the same forever.
Latter is advised for old farts who know they will never improve. Winning matches is good for their ego.
Former is advised for those who want to look good but shy away from playing matches with some excuse or the other.