konstaui / konstaui.com

Konsta UI website
https://konstaui.com
30 stars 13 forks source link

Ionic React documentation is out of date/incorrect #36

Open capperstrnd opened 9 months ago

capperstrnd commented 9 months ago

Hello! I'm in the process of getting KonstaUI into my project and noticed some documentation issues and hope for some more detailed information.

These comments pertain to src/pages/react/ionic.mdx

1) Ionic isn't based on create-react-app (anymore?), it's using a vite setup - which means following the create-react-app instructions for installing tailwind will lead you astray, instead the vite instructions found over on https://tailwindcss.com/docs/guides/vite should be used. Thus the information under ## Tailwind CSS Styles needs updating 2) Because Ionic has its own routing there should be some more detailed documentation examples for how to combine the two to ensure a well-navigatable and native feeling app experience. For example figuring out how to incorporate the TabBar in place of IonTabs was a bit of a journey. 1) As shown I had to place a component that had the tabbar, so you can access the IonRouter and use the router.push to manually traverse to a new tab. Default Ionic tabs starter has the tabs on the same level as the routing, and those tabs have prop inputs for the tab="tab1" and href="tab1". Something that simply isn't possible when incorporating KonstaUI since it doesn't have that integration so you'll need to manually replicate the behaviour in a sub-component.

I'll happily help out with documentation for this as I'm going through the motions right now

Enjoying the project so far and getting Material You components in Ionic thanks to KonstaUI is absolutely wonderful!


Example code for showcasing that it's based on vite, note the vite.config.ts at the bottom in the sidebar:

image

KonstaUI TabBar incorporation

Skärmavbild 2024-01-18 kl  21 06 04

image

Ionic default tabs starter

image

capperstrnd commented 9 months ago

Adding more information as I go along to keep track of things I find

Regarding the various components you need to keep using from Ionic, so far I've only been using IonPage, IonApp, IonReactRouter.

I do not use IonContent, IonToolbar, IonHeader, IonFooter - as these are and should be replaced with the KonstaUI counterpart for a seamless integration.