Closed gestchild closed 1 week ago
Size Change: +14 B (0%)
Total Size: 978 kB
Filename | Size | Change | |
---|---|---|---|
content/webapp/.next/static/chunks/pages/works/[workId]-d652e42a0ebf563c.js |
0 B | -25.9 kB (removed) | 🏆 |
content/webapp/.next/static/chunks/pages/works/[workId]-f8c488cfadee7e12.js |
25.9 kB | +25.9 kB (new file) | 🆕 |
Small amendment, for performance
useEffect(() => {
setItemsState(getItemsState(workItems,
offsiteRequesting));
}, [workItems]);
Reason is, if we always set the itemsState
to "stale" we call the itemsAPI even if none of the items (might be loads) are actually requestable and there's no point in that
The extra offsiteRequesting
argument will go soon when we release the offsite requesting feature
Thanks @agnesgaroux , I've added your suggestion with a slight tweak because offsiteRequesting can be undefined and setItemsState expects the value to be a boolean
What does this change?
This fixes a bug discussed on slack, where the items availability doesn't update when the tree navigation is used to move between items
How to test
yarn run-concurrently