Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ionic React documentation is out of date/incorrect #36

Open
capperstrnd opened this issue Jan 18, 2024 · 1 comment
Open

Ionic React documentation is out of date/incorrect #36

capperstrnd opened this issue Jan 18, 2024 · 1 comment

Comments

@capperstrnd
Copy link

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
Copy link
Author

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.

  • Where I use both IonPage and Page, IonPage is needed for routing purposes and is the highest level component in a page.

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

  • You can't use IonToolbar + IonHeader in combination with the KonstaUI's NavBar, especially apparent when you use the large NavBar that collapses on scroll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant