-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
drop Web3ReactProvider context provider in favor of zustand #621
Comments
@NoahZinsmeister any thought about this? The idea would essentially be to have a zustand slice which act very similar to the current context.
On uniswap/interface as i see now a mixture of zustand/redux & context is used. Would probably be nice there if it was a single source of truth as well. There also could still be a context component using zustand under the hood for ppl who want it to be in context. |
We're trying to create a separation between the external API and the implementation details. Ideally, we should be able to switch the internal state management without any breaking changes. The only thing is right now we force passing |
it has been discussed before here: #481 |
@talentlessguy didn't see, but also don't agree with the conclusion :) The doc sais that "this is the recommended way, if you want to use context", not "you should use context"
My proposal was slightly different to your pr though, as in the end you're still using a context provider in The beauty of having only an
|
We are just concerned with supporting these use cases if we ever decide to switch our internal data respresentations. If we decide to change the store in any way that would be a breaking change, which would be difficult for us to maintain. |
@vm understand your concern, but I think there are ways to not create a huge maintenance burden, while still allowing flexibility. The |
Hello, i'm currently looking into web3-react@v8 and wondering why
/store
uses zustand, butWeb3ReactProvider
uses context.Wouldn't it make sense to make this a
zustand
store as well? Seems a bit weird to do zustand->hooks->context, when it could just be zustand i think.We're already using zustand in the dapp and it'd be cool if
web3-react
would just be a slice we can import so it's together with other stores inside the redux dev tools.The text was updated successfully, but these errors were encountered: