Thanks for the feedback :) My point was more about keeping state and it's usage consistent, e.g. do not declare something as an array and access it as an object. But for small cases like having a name defined on a user object, it sometimes does make sense imo. What I did not mean is to have the whole complex state structure set out in the initial state. In that case it's better to use thorough validations when accessing it or delaying accessing the state until all the data is loaded. Should have probably made it more clear in the article :)
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.
Thanks for the feedback :) My point was more about keeping state and it's usage consistent, e.g. do not declare something as an array and access it as an object. But for small cases like having a name defined on a user object, it sometimes does make sense imo. What I did not mean is to have the whole complex state structure set out in the initial state. In that case it's better to use thorough validations when accessing it or delaying accessing the state until all the data is loaded. Should have probably made it more clear in the article :)