/**
* output:
* click {page: 2}
* click {page: 3}
* @memberof index
*/
/**
* output:
* click {page: 2}
* click {page: 3}
* @memberof index
*/
setState itself is not asynchronous, but for performance optimization, there is no immediate update
get
from the callback of the second parameter.this.setState({},()=>{
console.log(this.state.obj);
})
official documents
Previous: There is no reaction when you want to create a project, npm start with electron-quick-start.
** * output: * click {page: 2} * click {page: 3} * @memberof index * ...