i have a component that allows a user to select an option from a dropdown menu. The userâs selected is being set to localStorage, but i am wanting that localStorage value to be accessible to all other components in the project. I am thinking the way to make it globally accessible is to set a state.theme value equal to the value of the localStorage value. do you think this is an appropriate way of accomplishing the goal, and if so, how would i set a state.theme value to the localStorage value?
state.theme.myValue = localStorage.getItem(âmyValueâ), in afterCSR.
Also useEffect to update, if needed.
Iâm closing this thread because this is a duplicated topic with
Answer to the questions provided there