Last active
August 4, 2019 13:30
-
-
Save codingnninja/72df2fe2ebd014de2d5f14434e37a1d6 to your computer and use it in GitHub Desktop.
React state setup for FoodReca
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
import React from 'react'; | |
class App extends React.Component { | |
constructor() { | |
super(); | |
this.state = { | |
id: null, | |
userId: 1, | |
food: '', | |
cost: '', | |
status: false, | |
foodItem: {}, | |
foodItems: [], | |
editing: false | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment