Make sure your app is wrapped in a <Router />
I have a mini app which contains its own route path something like below . This root component is exported out and is being used in main app as a package dependency. Below is the usage
mini-app code
In the main app usage looks like below
14 Replies
I am getting above error saying
Make sure your app is wrapped in a <Router />
though its already wrapped
can someone pls help
@Alex LohrWhich version of the vite plugin are you using?
Most probably, it's because you're missing a
root
element
https://discord.com/channels/722131463138705510/1193253739868475423@Alex Lohr 4.0.3
Do you have a root element in your router tag?
No @Alex Lohr , is this required ?
and why it is required .. i am not understanding the issue
should it be a simple one parent router and then routes
It actually shouldn't be required.
I misunderstood the discussion.
I am using solid router 0.9 that doesn't take root
Pls help how can i achieve
i am working on a mini app and I want all the route to be sitting in the mini app
It would probably be best to update the router to the current version.
what i am doing is it not a good practice or what ?
I used to do it well in react native and navigators like this very well
I doubt it will work even if I update the solid router version
I will then have to keep all my routes in the main app and only export components from mini app package which I don't want.
No, I just meant that there might be errors in an older version of the router that would be fixed by the current version.
Okayy
Thank you !!
Did it help?
@Alex Lohr since our codebase is extremely huge. migration is a big effort. I will do this in sample project and keep u posted.