why Provider always at the top level? #4426
Unanswered
wangcongyi
asked this question in
Help
Replies: 1 comment 4 replies
-
So that your application knows which store to use. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have an increasingly complex application.
One day I need redux, and add the Provider component at the top level,
On another day I need react-query, and add the QueryClientProvider component at the top level too.
etc...
After many times the code is like this:
I worry that it will increase more and more in the future.
so Why provider (including other tools or libraries ) always at the top level?
Is this for convenience or what? Why do we need provider?
Beta Was this translation helpful? Give feedback.
All reactions