exporting setContext with store up the component tree and re-using it in the same component #12017
Unanswered
bartcuijpers
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm wondering if there's a best pratice to create an initialization function containing a setContext with a store, which is then executed in a component up in the comonent tree, and re-used in the same component.
I came up with two options...
option 1;
option 2;
In the second option the initilization of the store const is at the top level making the store directly available in the component itself. But I'm concerned about SSR data leakage...
Beta Was this translation helpful? Give feedback.
All reactions