decrediton
decrediton copied to clipboard
[deps] Update to React v18
The first step toward #3842
This diff updates to React v18 and enjoys the benefit of automatic performance improvement. It does not take further steps toward the new features, but it will be a good starting point.
The biggest issue was the react-hot-loader
, which is not maintained anymore and is not compatible with v18. I successfully replaced it with React Fast Refresh
though, which is the recommended way.
@testing-library/*
libraries also have been updated and the tests are fixed.
On top of this, we can gradually adopt the new features:
- use the new APIs for concurrent rendering:
-
startTransition
-
useDeferredValue
-
- update to strict mode
Tested on Linux, and macOS (amd64).
@bgptr can you please rebase this?
@dajohi Sure. I will do it asap.