-
Hi All, I am new to remix and was playing with it. I needed to use React context API within remix application and when I implement, server side rendering part works perfectly. however in the client side rendering part it hangs the application throwing errors continuously. I need to know whether,
Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
It should work as usual
Also note that the Outlet component has a context prop ( And, also note that if you want to access another route (loader) data you can use the useMatches hook to get all the routes data, and you can use useRouteData from Remix Utils which uses useMatches to get the data too. |
Beta Was this translation helpful? Give feedback.
-
I'm receiving an error |
Beta Was this translation helpful? Give feedback.
It should work as usual
Also note that the Outlet component has a context prop (
<Outlet context={value} />
) and a pair hook useOutletContext which let you share values between a parent and a child route.And, also note that if you want to access another route (loader) data you can use the useMatches hook to get all the routes data, and you can use useRouteData from Remix Utils which uses useMatches to get the data too.