Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rows: [
- { id: 212, title: "Task 1", complete: 20 },
- { id: 5454, title: "Task 2", complete: 40 },
- { id: 39172, title: "Task 3", complete: 60 }
- ]
- this.state = { apiData: this.props.getAllData(),
- data: [] }
- componentDidMount(){
- this.state.apiData.then(data => this.setState({ data: data.rows})) }
- rows: [
- { index: 0, id: 212, title: "Task 1", complete: 20 },
- { index: 1, id: 5454, title: "Task 2", complete: 40 },
- { index: 2, id: 39172, title: "Task 3", complete: 60 }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement