Stores, Reducers and Effect Logic #438
-
Hello - I have a general question surrounding stores, reducers and effects (and I understand these are going to be in the line of 'how long is a piece of string').. I have a particular complex UI which logically has a single store....
I ask as the examples are simple and I cannot find too many/any examples of a complex Flux pattern. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The number of properties is irrelevant, what matters is whether or not they all belong together, only you can answer that. As for number of lines of code. They should do what they need to do, and no more. If that means 1000 lines then it does; however, you should consider splitting them up into separate methods at least - you might want to consider having code that you can reuse (services for effects, static methods for reducers). |
Beta Was this translation helpful? Give feedback.
The number of properties is irrelevant, what matters is whether or not they all belong together, only you can answer that.
As for number of lines of code. They should do what they need to do, and no more. If that means 1000 lines then it does; however, you should consider splitting them up into separate methods at least - you might want to consider having code that you can reuse (services for effects, static methods for reducers).