Open atherdon opened 6 years ago
In this chapter we discussed how the setState function works, which updates our component state. It expects one parameter that is an object consisting of one or more key/value pairs. setState will take an object we pass it and replace the current component state on the given key with given value. You cannot push any object to the state because it will simply get updated and not returning the updated array.
can you show me a code line where you did it?
ok, checking your code right now. I assume we need to create a sub-component for a single meal. and please have at least 3 objects of meals(right now we have only one).
And please add fields, related to test.
@che607 can you tell me - should i close this task, right?
https://medium.com/quick-code/lets-learn-react-chapter-6-updating-component-state-80fcc7c01d24
Expected result
Test
1