Post

Reminds me of Sebastian Markbåge's tweet a while back: > This is also how most dependency injection in React apps should be done. Not Context. Import a named default value from JS. Override it in package.json imports.

0 reposts0 likes

I always felt this was awkward, as you usually want to inject, configure and control the double inline. Plus you likely need to mix and match *many* different dependencies for each test, rather than just have a 'test' and 'real' implementation of a single dependency/god object. Still, cool to see!