kolodny / safetest

MIT License
1.31k stars 31 forks source link

Technical reason for createOverride to rely on React Context. #24

Closed bricejar closed 1 month ago

bricejar commented 2 months ago

Hi,

What is the technical reason for createOverride to rely on react Context ?

A pure vanilla js version would allow to use it outside of a render cycle and it would make it work with any framework too.

kolodny commented 2 months ago

There isn't a strong reason, it just fits well with the React ecosystem. I'd be open to a proposal for a more generic solution if it doesn't increase end user complexity