Note on multiple setKey calls

This commit is contained in:
Abhas
2019-01-03 18:54:07 +05:30
parent 82cedfb40b
commit e46e756347
+2
View File
@@ -133,6 +133,8 @@ export default class App extends Component {
const data = await response.json(); const data = await response.json();
const [item] = data.results; const [item] = data.results;
// TODO: If possible, batch these two updates // 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); setData(item);
setLoading(false); setLoading(false);
}, () => ([this.getCount()])); }, () => ([this.getCount()]));