provide get*
equivalent to the use*
hooks that use remixContext
#2606
BenoitAverty
started this conversation in
Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
In the discord since the supporter preview launch, there has been several questions about the remixContext parameter of the handleRequest function in entry.server.tsx.
I understand that it would be a big constraint on future development if this was public API, but there is a solution for some use-cases.
If I look at the "useMatches" hook for example. The code does not seem very tied to React. The only built-in hook used is useContext, but that's not needed since we're in the handleRequest function : we already have the context.
Remix could export the following function :
this function could be used by user code without exposing more that is already exposed through the useMatches hook.
Beta Was this translation helpful? Give feedback.
All reactions