From e46e75634704807a0bfb7b99d099f1cf5ebc5c03 Mon Sep 17 00:00:00 2001 From: Abhas Date: Thu, 3 Jan 2019 18:54:07 +0530 Subject: [PATCH] Note on multiple setKey calls --- src/App2.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/App2.js b/src/App2.js index 5a19c50..99e6ed8 100644 --- a/src/App2.js +++ b/src/App2.js @@ -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()]));