DEV Community

Discussion on: Solid. Is It Still Useful In 2021?

Collapse
 
anicholson profile image
Andy Nicholson

These idea still apply in FP JS:

Every time we call connect() to wire up a React component to Redux or similar, we’ve just practiced dependency injection (props are injected dependencies) & single responsibility (component is not responsible for sourcing its own data).

Similarly, passing in callback functions to a component is following Open/Closed, as you’ve extended without modifying.

Collapse
 
leob profile image
leob

Great examples!