How to make new observable property in the observed object?

Create an object

@observable myData;
Then get data from server and write to this variable response

this.myData = response.json(); // {"fruits":["apple","orange","pineapple","grusha","arbuz"]}

Create a function in which I need to do manipulations with the data and add the calculated object myData: myData.freshFruits = ['apple','orange'];

If you change this object, nothing happens. All the objects that were originally created in myData for assigning a response from the server and react to any changes in them, and separately-created objects do not generate any action when they change.

Want to know why the observer does not see them?
June 8th 19 at 16:45
0 answer

Find more questions by tags React