📌 Enable Hooks
Hooks are now turned on by default and will be part of the next release 🎉. The release is also very close.
https://github.com/facebook/react/pull/14679
Hooks are now turned on by default and will be part of the next release 🎉. The release is also very close.
https://github.com/facebook/react/pull/14679
🏫 Warn When Hooks Type Change
React will now warn when you are returning different hooks on subsequent re-renders. Don’t forget the first Rule of Hooks.
https://github.com/facebook/react/pull/14585
React will now warn when you are returning different hooks on subsequent re-renders. Don’t forget the first Rule of Hooks.
https://github.com/facebook/react/pull/14585
🥢 Double-render Function Component With Hooks in Strict Dev Mode
If you’re using <StrictMode> in DEV builds, function components that call hooks will now be called twice to make it easier to spot side effects.
https://github.com/facebook/react/pull/14654
If you’re using <StrictMode> in DEV builds, function components that call hooks will now be called twice to make it easier to spot side effects.
https://github.com/facebook/react/pull/14654
🔄 Support Sync Thenables for lazy()
You can now pass a synchronous thenable (an object where the then property callback is executed synchronously) into lazy().
https://github.com/facebook/react/pull/14626
You can now pass a synchronous thenable (an object where the then property callback is executed synchronously) into lazy().
https://github.com/facebook/react/pull/14626
✌️ Warn When Passing Second Callback to setState/dispatch in Hooks
In class components, you can pass in a second callback to this.setState() that is run when the update is applied. When using hooks, this is not supported.
https://github.com/facebook/react/pull/14625
In class components, you can pass in a second callback to this.setState() that is run when the update is applied. When using hooks, this is not supported.
https://github.com/facebook/react/pull/14625
🛑 Disallow Reading Context During useMemo, etc.
The callback functions of useMemo, use(Layout)Effect, useReducer, and useState can no longer read context by accessing the internal dispatcher.
https://github.com/facebook/react/pull/14653
The callback functions of useMemo, use(Layout)Effect, useReducer, and useState can no longer read context by accessing the internal dispatcher.
https://github.com/facebook/react/pull/14653
🌏 reactjs.org Internationalization Using Forks
With the big help of Nat Alison (tesseralis) and the community, we’re starting to internationalize the official React documentation using forks of the english repository. Want to get involved? Check out the three initial forks:
Simplified Chinese: reactjs/zh-hans.reactjs.org
Spanish: reactjs/es.reactjs.org
Japanese: reactjs/ja.reactjs.org
https://github.com/reactjs/reactjs.org/issues/1605
With the big help of Nat Alison (tesseralis) and the community, we’re starting to internationalize the official React documentation using forks of the english repository. Want to get involved? Check out the three initial forks:
Simplified Chinese: reactjs/zh-hans.reactjs.org
Spanish: reactjs/es.reactjs.org
Japanese: reactjs/ja.reactjs.org
https://github.com/reactjs/reactjs.org/issues/1605
GitHub
reactjs.org Localization Forks · Issue #1605 · reactjs/reactjs.org
🌐🚨See here if you'd like to be a language fork maintainer! 🚨🌐 Hi everyone! My name is Nat and I'm picking up on the work Brian (@bvaughn) and Eric (@ericnakagawa) have been doing to...
☯️ Phased Dispatcher
The hooks module was refactored to use separate dispatchers for the mount and update phases. This speeds up initial render by removing update-only branches from the hot path.
https://github.com/facebook/react/pull/14701
The hooks module was refactored to use separate dispatchers for the mount and update phases. This speeds up initial render by removing update-only branches from the hot path.
https://github.com/facebook/react/pull/14701
🏞 WIP: Partial Hydration
The Core team is working on a new partial hydration mode that can start hydrating a server rendered result while some parts are still loading. The goal is decrease the time to interactive.
https://github.com/facebook/react/pull/14717
The Core team is working on a new partial hydration mode that can start hydrating a server rendered result while some parts are still loading. The goal is decrease the time to interactive.
https://github.com/facebook/react/pull/14717
📚
The
https://github.com/facebook/react/pull/14723
useReducer Lazy Initialization APIThe
useReducer API to lazily initialize the state was changed so you can provide an initializer function instead of initial actions that had to be handled in the reducer itself.https://github.com/facebook/react/pull/14723
📌 Warn When Second Argument Is Passed to
In the initial alpha version, the second argument to
https://github.com/facebook/react/pull/14729
useContextIn the initial alpha version, the second argument to
useContext could be used to set the observedBits. React now warns when a second argument is passed and the team can thus change the meaning later.https://github.com/facebook/react/pull/14729
🎉 React v16.8: The One With Hooks
Three month after the initial reveal of React Hooks at React Conf 2018, this new feature is now part of the latest stable release. If you haven’t heard of hooks before, check out the official documentation.
https://reactjs.org/blog/2019/02/06/react-v16.8.0.html
Three month after the initial reveal of React Hooks at React Conf 2018, this new feature is now part of the latest stable release. If you haven’t heard of hooks before, check out the official documentation.
https://reactjs.org/blog/2019/02/06/react-v16.8.0.html
🌏 Is React Translated Yet?
You can now track the status of the React documentation translation effort on this new website: https://www.isreacttranslatedyet.com/
🌍 New React Internationalization Repos
This week, eight new internationalization repositories were created. Your language is not listed? Get involved!
Azerbaijani: reactjs/az.reactjs.org
French: reactjs/fr.reactjs.org
Indonesian: reactjs/id.reactjs.org
Korean: reactjs/ko.reactjs.org
Portuguese (Brazil): reactjs/pt-BR.reactjs.org
Russian: reactjs/ru.reactjs.org
Traditional Chinese: reactjs/zh-hant.reactjs.org
Vietnamese: reactjs/vi.reactjs.org
https://github.com/reactjs/reactjs.org-translation
You can now track the status of the React documentation translation effort on this new website: https://www.isreacttranslatedyet.com/
🌍 New React Internationalization Repos
This week, eight new internationalization repositories were created. Your language is not listed? Get involved!
Azerbaijani: reactjs/az.reactjs.org
French: reactjs/fr.reactjs.org
Indonesian: reactjs/id.reactjs.org
Korean: reactjs/ko.reactjs.org
Portuguese (Brazil): reactjs/pt-BR.reactjs.org
Russian: reactjs/ru.reactjs.org
Traditional Chinese: reactjs/zh-hant.reactjs.org
Vietnamese: reactjs/vi.reactjs.org
https://github.com/reactjs/reactjs.org-translation
GitHub
GitHub - reactjs/translations.react.dev: Nexus of resources and tools for translating the React docs.
Nexus of resources and tools for translating the React docs. - reactjs/translations.react.dev
🧪 Add
Two new test helpers are now available for batching updates so that tests more closely match the real behavior.
https://github.com/facebook/react/pull/14744
ReactTestRenderer.act() and ReactTestUtils.act()Two new test helpers are now available for batching updates so that tests more closely match the real behavior.
https://github.com/facebook/react/pull/14744
⏰
A new unstable API was added to the Scheduler to queue a task with a lower priority than the default priority of interaction callbacks. This allows CPU or IO-heavy work to run after the UI responds.
https://github.com/facebook/react/pull/14756
Scheduler.unstable_next()A new unstable API was added to the Scheduler to queue a task with a lower priority than the default priority of interaction callbacks. This allows CPU or IO-heavy work to run after the UI responds.
https://github.com/facebook/react/pull/14756
⏮ Backwards Compat Fix for
A previous pull request caused issues when combining newer renderers with a version of the react package that predated the change. This is now fixed.
https://github.com/facebook/react/pull/14770
ReactCurrentDispatcherA previous pull request caused issues when combining newer renderers with a version of the react package that predated the change. This is now fixed.
https://github.com/facebook/react/pull/14770
📌 React v16.8.1 Patch Release
After the big v16.8 release, the team also worked on some smaller bug fixes which are now out as well. Thank you for your hard work!
https://github.com/facebook/react/blob/master/CHANGELOG.md#1681-february-6-2019
After the big v16.8 release, the team also worked on some smaller bug fixes which are now out as well. Thank you for your hard work!
https://github.com/facebook/react/blob/master/CHANGELOG.md#1681-february-6-2019
☕️ React as a UI Runtime
In this comprehensive article, Dan (@gaearon) wrote a lot about the internals of React. I highly recommend this read: https://overreacted.io/react-as-a-ui-runtime/
In this comprehensive article, Dan (@gaearon) wrote a lot about the internals of React. I highly recommend this read: https://overreacted.io/react-as-a-ui-runtime/
🏞 Partial Hydration
The partial hydration PR has now landed in master. This new mode can start hydrating a server rendered result while some parts are still loading. The goal is decrease the time to interactive.
https://github.com/facebook/react/pull/14717
The partial hydration PR has now landed in master. This new mode can start hydrating a server rendered result while some parts are still loading. The goal is decrease the time to interactive.
https://github.com/facebook/react/pull/14717
📚 Component Stack in act() Warning
The warning about missing act() wrapping in some test environments now contains a component stack trace.
https://github.com/facebook/react/pull/14855
The warning about missing act() wrapping in some test environments now contains a component stack trace.
https://github.com/facebook/react/pull/14855
🖥 Fix SSR Context Leaks When Render Stream Destroyed Early
This PR fixes a Context memory leak in the SSR if a stream is destroyed before the render completes.
https://github.com/facebook/react/pull/14706
This PR fixes a Context memory leak in the SSR if a stream is destroyed before the render completes.
https://github.com/facebook/react/pull/14706