New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Context Transform #12234
Comments
I like this but for the love of god let's not call it middleware, please :) |
Context.Map? |
Yeah I like Context.Map or Context.Transform |
I like Context.Transform. Map is so overloaded. Is it a |
Alternatively, we could add a |
Third-party vote for |
@sebmarkbage i think this is doable in user-land: https://codesandbox.io/s/mjv84k1kn9 Looking at the context api it seems very low level, curious if you really expect plain use that would warrant more add-ons. As it is, everything can be a bit verbose, transforms, creation, reading and sharing. But if it's kept relatively simple and focussed, doing one thing well, then that would be fine as user-land will build patterns around it. |
This is sufficiently covered by #13139 |
With the new context API it is really bulky to create a middle man that consumes one context value, transforms it and provides another one. You have to create many components and store an intermediate state to avoid rerendering the provider if the input is unchanged.
We could have a convenience API for this use case.
cc @acdlite
The text was updated successfully, but these errors were encountered: