v16.8.0
版本发布时间: 2019-02-06 16:19:40
facebook/react最新发布版本:v18.3.1(2024-04-27 03:53:42)
React
- Add Hooks — a way to use state and other React features without writing a class. (@acdlite et al. in #13968)
- Improve the
useReducer
Hook lazy initialization API. (@acdlite in #14723)
React DOM
- Bail out of rendering on identical values for
useState
anduseReducer
Hooks. (@acdlite in #14569) - Use
Object.is
algorithm for comparinguseState
anduseReducer
values. (@Jessidhia in #14752) - Don’t compare the first argument passed to
useEffect
/useMemo
/useCallback
Hooks. (@acdlite in #14594) - Support synchronous thenables passed to
React.lazy()
. (@gaearon in #14626) - Render components with Hooks twice in Strict Mode (DEV-only) to match class behavior. (@gaearon in #14654)
- Warn about mismatching Hook order in development. (@threepointone in #14585 and @acdlite in #14591)
- Effect clean-up functions must return either
undefined
or a function. All other values, includingnull
, are not allowed. @acdlite in #14119
React Test Renderer and Test Utils
- Support Hooks in the shallow renderer. (@trueadm in #14567)
- Fix wrong state in
shouldComponentUpdate
in the presence ofgetDerivedStateFromProps
for Shallow Renderer. (@chenesan in #14613) - Add
ReactTestRenderer.act()
andReactTestUtils.act()
for batching updates so that tests more closely match real behavior. (@threepointone in #14744)
ESLint Plugin: React Hooks
- Initial release. (@calebmer in #13968)
- Fix reporting after encountering a loop. (@calebmer and @Yurickh in #14661)
- Don't consider throwing to be a rule violation. (@sophiebits in #14040)
Artifacts
- react: https://unpkg.com/react@16.8.0/umd/
- react-art: https://unpkg.com/react-art@16.8.0/umd/
- react-dom: https://unpkg.com/react-dom@16.8.0/umd/
- react-is: https://unpkg.com/react-is@16.8.0/umd/
- react-test-renderer: https://unpkg.com/react-test-renderer@16.8.0/umd/
- scheduler: https://unpkg.com/scheduler@0.13.0/umd/