|
|
|
|
|
by shermanmccoy
2088 days ago
|
|
This is not a religious stand against all global state. Username, permissions fine to be global, this is very easy for someone new to your code to grok. I put them in the top React context, then just useReducer where I need to. Don't need to pass down through props to every component anymore, thanks to React context and useReducer. Although I was thinking if you wanted to be a religious zealot about not coding any of your own global state you could use the browser session API. |
|