Just starting out with Ionic/Vue having been working with Ionic/Angular for a few years. Trying to get to grips with some best practices early on.
To save importing and registering the following in every page …
…I have created a BasePage component which imports these and which I have registered globally. I can then utilise this base component in any page like this:
<base-page pageTitle="My Page">
I’m assuming this is good practice? Would it then make sense to create other base components in the same way e.g BaseModal, BaseList, BaseForm and so on and (presumably) making good use of Vue slots in these base components?
The docs go over a slightly easier way to do global component registration: https://ionicframework.com/docs/vue/quickstart#global-component-registration
That being said, it you are only registering a handful of components or your app is small/medium in size, this may be an acceptable tradeoff.
This is just my opinion
I have been building apps with ionic for quite a while and I have never really found much value in creating base components… It seems more of one of those things that saves me a few seconds of typing but as they say, the juice just isn’t worth the squeeze. Unless you are creating your own component library that you are going to repeatedly use in multiple other applications… but even then I still don’t get the value in the long term