Answer the question
In order to leave comments, you need to log in
React.js: What's the difference between an Object State and an Array State?
Hello, I'm learning React.js and I've encountered difficulties in displaying data from state: when updating a state with type Object, the changes are not reflected in the view. But if you update the state with the Array type, then the updated data is displayed in the view.
state code with Object type:
pastebin.com/sDJJhTrS
state code with Array type:
pastebin.com/bMyFMc6w
In both cases, there is data in the state. Tell me what is the difference and how to fix the code so that the state with the Object type updates the view?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question