|
|
|
|
|
by pg_bot
2165 days ago
|
|
Nah you can get reusability by creating shared components that you just pass props into. For example, you can have a date picker that just accepts variables to display the current state and parent component that reads data from the store and passes it into the date picker component. This method is also great for debugging, since you can just replay the state transitions over again if there is an application error. If the component holds the state, then it can be cumbersome to reproduce the error. |
|
if you have no state in the component that would not be possible. you can also not wrap this with an other component that can hold this state because you don't want components with state. that means all behaviour that requires state would have the state in the store this will just be crazy