DEV Community

Discussion on: Simple, Typesafe React Modals using Portals and Custom Hooks

Collapse
 
thebox193 profile image
Sir.Nathan (Jonathan Stassen)

Really like this pattern Nate!

Extending off this idea, I've been wondering about making a global Modal provider & context. But I'm not sure how much value it would add.

Collapse
 
arnonate profile image
Nate Arnold

We are driving some of our global UI state with Apollo useReactiveVar now. It's handy and already ships with Apollo. I wouldn't suggest mixing your global state management though, so context works if you are already using it :)