andyrichardson / andyrichardson/tipple
Add "new Suspense" support
- Ngôn ngữ chính
- TypeScript
- Star
- 129
- Fork
- 5
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
https://reactjs.org/docs/concurrent-mode-suspense.html
## Update 1
Quick update on my thoughts surrounding this so far.
While there isn't a huge amount of work to support concurrent-react, there are [pattern changes](https://reactjs.org/docs/concurrent-mode-suspense.html#for-library-authors) that will need to be considered.
I haven't used these patterns in person yet so I will save my scepticism until having tried it out. The following API changes would need to be made:
- useFetch / usePush would need to stay the same (breaking changes would occur otherwise)
- usePreloadedFetch / usePreloadedPush would be completely separate implementations which are responsible for reading from the client and throwing / resolving results
- preloadFetch / preloadPush would be responsible for triggering API calls
This has two major impacts on Tipple:
- For suspense support, fetching + reading state are two separate interactions (as opposed to useXYZ which does both)
- As fetching in Tipple is currently coupled to the hooks/calling components, changes would need to be made to the client + overall implementation
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.