This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If I have an application that shows the green houses in a city, you load the application and I want to show all the green houses on a map so I do the necessary call and stick the data in my state under houses | |
state = { | |
houses: [arrayWithAllTheHouses] | |
} | |
now I also want to be able to show houses specific for an owner, imagine the owner has 3 green houses, I was thinking to put in my state: | |
state = { | |
houses: [arrayWithAllTheHouses] | |
selectedUser: {userDataFromTheSelectedUserNothingNested} | |
selectedUserHouses: [arrayWithAllTheHousesForTheUser] |