1.0.69 - The lazy update
BREAKING CHANGES
- Scroll resources now need to have a Normalized type that extends the Data type
To put it another way, your Data type must have an union with your data and your normalized data:
return XSWR.scroll<Data | string, Error, string>(url, fetcher)
This is because on scroll, previous pages are in normalized form, but the next page is in data form
newData = [...previousPages: Normalized[], nextPage: Data]
CHANGES
- Object states are now lazy initialized on fetch(), mutate(), refetch(), scroll(), update()
- Fixed bugs
- Fixed types