mirror of
https://github.com/bendtherules/react-hooks-with-class.git
synced 2026-08-18 13:53:06 +00:00
Note on multiple setKey calls
This commit is contained in:
@@ -133,6 +133,8 @@ export default class App extends Component {
|
||||
const data = await response.json();
|
||||
const [item] = data.results;
|
||||
// TODO: If possible, batch these two updates
|
||||
// In general, merging should be done for most set{Key} calls,
|
||||
// to be similar to today's classes
|
||||
setData(item);
|
||||
setLoading(false);
|
||||
}, () => ([this.getCount()]));
|
||||
|
||||
Reference in New Issue
Block a user