Wrapper hooks have different states for same key #1026
-
In this example with wrapper hooks, why doesn't the upper text update when the bottom button is pressed? https://codesandbox.io/s/useswr-no-rerender-ml17e?file=/src/App.js Sorry for the contrived example, working in a big codebase. Thanks in advance for any help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi, I guess it's because when you declare |
Beta Was this translation helpful? Give feedback.
-
For now we're solving this with a system like this one as a workaround. |
Beta Was this translation helpful? Give feedback.
For now we're solving this with a system like this one as a workaround.
https://github.com/vercel/commerce/blob/master/framework/commerce/utils/use-data.tsx