S
SolidJS•12mo ago
Vexcited

`@solidjs/router` doesn't seem to work with Capacitor

In my index.tsx, I defined the routing like this
<Router>
<Routes>
<Route path="/" component={MainAppPage} />
<Route path="/link" component={LinkPage} />
<Route path="*" element={<p>not found</p>} />
</Routes>
</Router>
<Router>
<Routes>
<Route path="/" component={MainAppPage} />
<Route path="/link" component={LinkPage} />
<Route path="*" element={<p>not found</p>} />
</Routes>
</Router>
In my MainAppPage, I have a <A href="/link">Link account</A> When clicking on it, nothing happens on the built app through Android Studio, I don't even have an error in the console, nothing. When checking in the browser on the PC, it works though. Any idea on what's happening with Capacitor? did a showcase video in case my explanation isn't good enough 😭
1 Reply
Vexcited
Vexcited•12mo ago
fixed it by removing my LocaleProvider that was blocking the router somehow ?
<LocaleProvider>
<Router>
<Routes>
<Route path="/" component={MainAppPage} />
<Route path="/link" component={LinkPage} />
<Route path="*" element={<p>not found</p>} />
</Routes>
</Router>
</LocaleProvider>
<LocaleProvider>
<Router>
<Routes>
<Route path="/" component={MainAppPage} />
<Route path="/link" component={LinkPage} />
<Route path="*" element={<p>not found</p>} />
</Routes>
</Router>
</LocaleProvider>
this was breaking my router, any idea why? upgraded solidjs from 1.7.3 to 1.7.6 in my i18n package somehow solved my issue