SolidJSS
SolidJSโ€ข3y agoโ€ข
9 replies
Lo | Building Dromo

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
<ContextProvider>
    <Routes>
        <FileRoutes />
    </Routes>
</ContextProvider>
YouTubeThe Net Ninja
In this Solid js tutorial you'll learn how to use Context to create global state.

๐Ÿš€๐Ÿฅท๐ŸผGet early access to this entire course now on Net Ninja Pro:
https://netninja.dev/p/solid-js-tutorial

๐Ÿ“‚๐Ÿฅท๐Ÿผ Access the course files on GitHub:
https://github.com/iamshaunjp/solid-js-tutorial

๐Ÿ’ป๐Ÿฅท๐Ÿผ Modern JavaScript Tutorial:
On Net Ninja Pro - https://netninja.de...
Solid JS Tutorial #14 - Context
Was this page helpful?