3 ms·
That sounds completely opposite to the React functional philosophy and is akin to using global variables in a regular program. Have fun testing that!
by zepolen 9y ago
That sounds completely opposite to the React functional philosophy and is akin to using global variables in a regular program.
Have fun testing that!
- egeozcan 9y agoYou can test the base component or test the connected component with a dummy state. If your state is shallow, this is very easy to do.
- Jare 9y agoMy second problem with Redux, besides the common one about boilerplate, is precisely the mismatch between the recommended, RDBMS-like shallow store, and the typically tree-like OO nature of both the UI and the application logic. I understand that concrete containers act as adapters between the store and a given level of the application/UI tree, but this "impedance mismatch" is a real drag.
- mateuszf 9y agoIt's actually trivial to test, because all of the state is known at any time. So yes - kinda global state, but exact full state as input and exact full state out as output. Which you can test sliced into parts with as many tests as you want.