Carlo Nyte
Context providers inside <Routes> don't provide context values to routed content - Issue #273
This works:
This doesn't:
The solution that Ryan had provided here worked with solid-router 0.9.x but now with version 0.10.x it no longer work since
<Outlet />
component and the element
attribute no longer exist.
<Routes> <AuthRoutes /> <FinanceRoutes /> <CalendarRoutes /> </Routes> function AuthRoutes = () => { return <Route path="" element={<I18nProvider namespaces={['auth']}><Outlet /></I18nProvider>}> <Route path=... element=... /> <Route path=... element=... /> <Route path=... element=... /> </Route> }Does anyone know what the new solution is?
4 replies
How to use Context/ ContextProvider with File Routes
If you are using FileRoutes and want to use a
context
around your entire app is there how exactly do you do?
I've been using https://www.youtube.com/watch?v=ndB7PwS1yqk&t=309s as a guide but they don't use file routes.
My assumption was to do this, in root.tsx
10 replies
*Npm Run Start* Fails To Mysterious Error
Is there a recommended way to debug solid-start start? I'm running into this issue where my app fails after I build, but in solid-start dev everything is fine. This is the error I'm getting:
I also tried
npm --loglevel verbose run build
and DEBUG=1 npm run build
but neither didn't help uncover what the error is related to..9 replies
CreateResource Not complete Fetch (promise) when page first loads, but completes when VsCode Saves
Hey I'm severely confused about what's happening under the hood for npm run dev. When I'm using createResource(fetcher) and do a console.log(response) in the fetcher function, the data gets printed out in my VSCode terminal only. But once when I hit save without changing anything, it will show up in the console of my browser (chrome). Does anyone know what is happening to cause this?
My example:
12 replies