This, in turn, is why Redux is such a common part of React development: While this approach is very sensible for relatively small projects - or when the shared state can be kept contained one or two levels up - it becomes very difficult for large cross-referencing apps.
Personally, I try to keep lifting limited to two levels, and beyond that I start to consider two options:
Is my design flawed in some way when it requires deeper nesting? Could I abstract into logical components that take some of this weight off presentational components?
Do I need a state store to keep track of all of this information? Which one (and accompanying patterns) should I choose?
I think using a state store will definitely solve most of your problems. Lifting state up, prop drilling, whatever you say, I've found Redux to be really helpful when it comes to bigger projects. A single source of truth sounds cool.😊😊
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This, in turn, is why Redux is such a common part of React development: While this approach is very sensible for relatively small projects - or when the shared state can be kept contained one or two levels up - it becomes very difficult for large cross-referencing apps.
Personally, I try to keep lifting limited to two levels, and beyond that I start to consider two options:
Yes, you're right.
I think using a state store will definitely solve most of your problems. Lifting state up, prop drilling, whatever you say, I've found Redux to be really helpful when it comes to bigger projects. A single source of truth sounds cool.😊😊