redux-subscribe
redux-subscribe copied to clipboard
Comparison with redux-watch?
Looks kind of like https://github.com/jprichardson/redux-watch . Thoughts on similarities or differences? I see that redux-watch allows use of selector functions, while redux-subscribe looks like it's based on string paths.
Ya, I looked at redux-watch before I made this. The two big differences I see are:
- Strings vs selector functions, as you mentioned. Using selector functions means that the performance is proportional to the total number of subscriptions. This does not scale well at all. Strings allow it to be proportional only to the total number of unique subscriptions.
- redux-subscribe is a middleware whereas redux-watch is a store wrapper thing. This allows redux-subscribe to sit in the middle and setup/teardown subscriptions in response to actions, which lets you keep everything pure and internal to redux.
I'll add a little comparison section to the docs, thanks for bringing this up.