Description
This list might change, just putting it out there as the first draft.
Posting these together since they're related, and we don't plan more 15.x releases after 15.5 anyway.
To put these changes in context, we have a few goals:
(Click to show)
-
For the past several months, we have been working on a rewrite of React codenamed “Fiber”. Initially, it won’t affect public API, but it brings several new features (like Add fragment API to allow returning multiple components from render #2127 and Error boundaries: Recover from errors thrown in
render
#2461). Fiber gives us a solid foundation to improve React core in numerous ways. We’ll be talking more about it soon, and we intend to ship it with React 16 by default. -
To reduce the bundle size, we need to remove the APIs that we don't recommend, such as
createClass
andReact.DOM.*
helpers. We intend to warn once about their usage so that you can start removing dependencies on them. They will still be available as separate packages, but we will exclude them from the default build of React 16. -
We would like to have more control over the bundles so that we can better optimize them. This is why we are considering switching to flat bundles (and thus removing access to React internals in
react/lib/*
andreact-dom/lib/*
) in React 16. This will also mean faster compile times by default for users of Webpack and other bundlers, and faster server-side rendering performance.
Here’s a speculative list of changes we think of doing in these releases:
Past Releases
I’ve moved these to the end of this post.
16 Final
- Update
react-art
to use newprop-types
package #10625 (@flarnie & @sophiebits) - Check if Add test fixtures to cover disabled selected options #10142 is a real regression (@nhunzaker, @aweary)
- Check Google issue (
still exists after RC2turns out to be polyfill.io bug, Map.prototype.forEach fires the callback for an empty Map polyfillpolyfill/polyfill-service#1299) https://www.reddit.com/r/javascript/comments/6pqrz5/comment/dmrl0nh - Figure out what we want to do regarding Add test for warning for camelCased unknown props #10612 and Wrong SSR diff warning due to non lowercase attributes #10672 @gaearon
- Ensure Enzyme isn't blocked on anything from our side for 16 compat. (@flarnie)
- Remove
unstable_
prefix fromunstable_createPortal
and alias it @gaearon Make ReactDOM.createPortal() official #10675 - Ensure we show a sensible warning for this case Remove toString-based minification check #10673 @gaearon
- Preparing for the Final Release: (React team in general)
- Write blog post adapted from React 16 RC #10294 (@acdlite)
- Add attribute info to big changes section
- Consolidate/remove "Updates" section at the end
- Server hydration: make hydration changes more prominent in breaking changes section, maybe write a full blog post later (Document that you can't rely on React 16 SSR patching up differences #10591)
- Write blog post adapted from React 16 RC #10294 (@acdlite)
- Release an update to DevTools with Fix the DevTools warning URL react-devtools#892
- Website (@bvaughn and @flarnie)
- Docs
- Document ability to return strings and arrays from
render
- Document
createPortal()
- Merge server streaming doc into regular dom server doc and fix imports to match new unified entry point
- Test renderer Add ReactTestRenderer documentations #10692
- Document ability to return strings and arrays from
- Right after release:
- Update CDN URLs on website and official fiddle to reference new paths (
/umd/*
rather thansebmt/*
) - Update doc snippets (such as all codepens on the website!) to use 16.
- Update CDN URLs on website and official fiddle to reference new paths (
TODO: Add any bugs discovered while testing RC.
16 Wishlist
- Fix hot reloading in RN (probably needs
unstable_forceUpdateDeep()
and then change https://github.com/gaearon/react-deep-force-update to use it) - Show a better message for missing React (Show a better message if React is not loaded #10406)
- Make sure we offer a way of canceling
setState
updater form (https://twitter.com/nishb1/status/852542873803345920) (@gaearon will follow up) - Remove Stack and compat code
- Add support to Enzyme for Fiber (Refactor enzyme to use Adapters, initial React 16 support enzymejs/enzyme#1007)
Past Releases
15.5
(Click to show)
- ReactDOM fixes, if @jquense @nhunzaker @aweary want to release any.
- We should probably ship a fix for Invariant Violation when rendering using both ReactDOM and ReactDOMServer #8487 (Move
getNextDebugID()
to React package. #9005) - New warning: callback refs on stateless functional components (Warn for callback refs on functional components (Stack + Fiber) #8635, Dedupe warnings about refs on functional components #8739)
- New API deprecations:
-
React.createClass
(will be moved to a separate package, and we provide a codemod if you want to update to ES classes) -
React.createFactory
(will be moved to a separate package or removed, it's a one-liner) -
We forgot to do it. Moving to 15.6React.DOM.*
factories (will be moved to a separate package, Create react-addons-dom-factories package #8356) -
We forgot to do it. Moving to 15.6React.createMixin
(will be removed, Deprecate React.createMixin #8853) -
React.propTypes
(will be moved to a separate package) - Deprecate React addons Plan for Addons in React 16 #9207
- Decide how to handle all of this with the UMD addons build
- Fix this bug TypeError: Cannot read property 'firstChild' of null at precacheChildNodes (react-dom.js:6619) #9351
-
15.6
See #9398.
16 Alpha
(Click to show)
- Remove deprecations added in 15
- Stop appending
px
to strings (Remove css px warning, stop appending px to strings #6899) - Remove
LinkedStateMixin
,valueLink
andcheckedLink
(Kill ReactLink, LinkedStateMixin, valueLink and checkedLink #8165) - Remove
React.__spread
andReact.createMixin
- Move
React.createClass
to a separate package - Move
PropTypes
to a separate package. - Move
React.DOM.*
factories to a separate package - Decide what to do with the addons build
- If we keep any addons, they need to work regardless of whether React is aliased to a flat bundle or not (which is not the case now)
- Stop appending
- Strip PropTypes checkers in production build (Strip PropTypes checkers in production build #8066)
- Re-add warning about calling PropTypes directly (Re-add the warning about PropTypes #8080)
- More ReactDOM fixes, if @jquense @nhunzaker @aweary want to release any.
- Make a decision on the input fix by @jquense (for now accepted, but follow up work will change this. @flarnie link to issue on related follow up work)
16 Beta
(Click to show)
- Actually enable fragments (@flarnie verified this)
- Make error boundaries official (@bvaughn)
- Choose lifecycle naming
- Codemod stuff
- Decide whether to runtime warn for the old name (decided: let's not do it)
- Fix the issue with
invokeGuardedCallback
(tracking in [Fiber] returning functions from render does not throw #9577, @acdlite is working on this) - (This came up internally) Set a hard limit for recursion [Fiber] Infinite loop caused by a rendering error #9193. (@acdlite)
- Duplicate React + string refs results in very confusing error (ref is not a function). We should provide a good invariant for that. (String Refs Without An Owner Should Fail Gracefully #9962, @spicyj @flarnie and @gaearon) (is this Draft issue also about this? Refs must have owner facebookarchive/draft-js#296)
- Is there a test for this? (@flarnie)
- Warn (throw?) when doing an update on a container that was manually emptied outside of React (in stack, this mounted a brand-new tree; in fiber, it tries to apply an update and usually fails) (@flarnie in Add warning for rendering into container that was updated manually #10210)
- Is there a test for this? (@flarnie)
- Additional APIs we need in order to start experimenting with async. (@acdlite)
-
React.unstable_AsyncComponent
-
ReactDOM.flushSync(batch)
-
- sanity test - use in a CRA app, and check fixtures
- Messaging
- Update isfiberreadyyet.com
- Compose a Tweet
16 RC
(Click to show)
- [m-l] Pass DOM props through (RFC: Plan for Attributes in React 16 #10399, latest is: Find callsites that would call toString() if we pass attributes through #10416) (@gaearon, @spicyj, @sebmarkbage, @flarnie, @acdlite)
- Regression: we should warn if object is passed to an event listener prop Warn early if event listener is not a function #10407 (@aweary) (fixed? in Warn early for non-functional event listeners #10453 but needs
reviewupdated and merged) - Make sure input variables (props, state) point to the correct values for each lifecycle. Example where this isn't the case for
componentWillMount
: https://jsfiddle.net/m3pL3yaj/ (@acdlite) (fixed in Reset instance vars before calling commit phase lifecycles #10481) -
select
's onChange event fires with incorrect selectedIndex, value (<select>'s onChange event fires with incorrect selectedIndex, value #10420 @sebmarkbage) - How do we ensure weak minifiers don't ship the bundle twice? Ensure flat bundles don't duplicate code with weak minifiers #9589 (@flarnie, @trueadm) (fixed in Throw error to warn of mistaken loading of prod + dev React bundles #10446)
- Bug: SSR has false positive warnings for SVG tags Server side rendering: "Warning: <linearGradient /> is using uppercase HTML. Always use lowercase HTML tags in React." #10415 (@spicyj) (fixed in Don't warn about casing in SSR for non-HTML NS #10452)
- Bug: Unexpected cross-domain error passed to
componentDidCatch
Cross-origin error passed to componentDidCatch incorrectly #10441 (@bvaughn) (fixed in Better messaging for componentDidCatch cross-origin errors #10447) - Warn when nesting a 15 tree inside 16 (@spicyj Warn when nesting 15 subtree inside 16 #10434) (fixed in Warn when nesting 15 subtree inside 16 #10434)
- undefined is not a function (evaluating 'owner.getName()') Error in 16 beta: undefined is not a function (evaluating 'owner.getName()') #10443
- Regressions reported in beta
- The server renderer crashes in production with inline styles. (React 16 server renderer breaks with style object in prod mode #10299, fixed by Fix ReactPartialRenderer in production #10300)
- The server renderer doesn't yet support returning arrays and strings from components (fixed by fix renderToString fails with array type children when react-dom/server render #10221)
- The server renderer still renders
data-reactid
somewhat unnecessarily. (Server-rendered HTML polluted with empty data-reactid attributes #10306) (@gaearon)- Potentially fixed by Add ReactDOM.hydrate() as explicit SSR hydration API #10339 (@gaearon)
- In some cases
Error: null
is reported instead of the real error. ("Error: null" in the captured error warning due to cross-origin issues #10321) [decision: update the error message] (@acdlite) - Shallow renderer doesn't implement
unstable_batchedUpdates
. [decision: team seems to be leaning away from doing this; discussion in React 16 shallow renderer batched updates discussion #10355]
- [s-m]
shouldComponentUpdate
with functional components [decision: delete it for now, add it in a minor] (@sebmarkbage) Remove hidden functional shouldComponentUpdate API #10371 - There is a report that Google crawler can’t render the page using 16 (link). (@flarnie)
-
Check if [16.0.0-alpha.12] ReactDOM removes server rendered content before rendering it again #10405 is a real regression(No, it's been fixed looks like.) - [s-m] Ensure type validation didn't regress when we enabled new features [Fiber] returning functions from render does not throw #9577 (@gaearon)
-
Decide if we want to break value attribute syncing behavior (Controlled inputs do not synchronize value or checked attribute #10150)[decided to postpone until 17] - [s-m] Decide if we want to stop calling
componentDidUpdate
from shallow renderer (Don't call componentDidUpdate() in shallow renderer #10372) - Decide: what do we do about polyfills?
- Map/Set (need to throw early, @gaearon) Warn on missing Set/Map polyfills #10356
- Object.assign (keep or assume it's there?) Remove object-assign polyfill #10280 [decision: keep it bundled for now]
- rAF [decision: keep it required]
(Maybe use the same approach/standard as Relay? https://facebook.github.io/relay/docs/relay-modern.html#javascript-environment-requirements)
- Big missing pieces
- Add server rendering and reviving
- Add shallow renderer
- We seem to be decoupling shallow renderer from ReactDOM. However in 15
findDOMNode()
works inside of shallow renderer because it contains ReactDOM injections. Is this going to be a breaking change? (@gaearon) [decision: let's not support this]
- We seem to be decoupling shallow renderer from ReactDOM. However in 15
- Decide on whether to include warning whitelisting/blacklisting (@bvaughn) [decision: not in 16.0]
- Maybe: Switch to flat bundles (no more
react-dom/lib/*
, internals are truly private)- Decide: plan forward for popular projects depending on internals (
react-native-web
,react-tap-event-plugin
) (might not block final)-
EventPluginHub
is "dangerously" exported from flat bundle for tap event plugin -
react-native-web
probably needs more internals, coordinate with @necolas (done in Add react-dom-unstable-native-dependencies #10138)
-
- Decide: plan forward for popular projects depending on internals (
-
Support[decision: not gonna do this now]class
andfor
Support "for", "class", "http-equiv", and "accept-charset" #10169 (@gaearon) - Feature parity for renderers
- Shallow renderer supports strings and arrays
- Server renderer supports strings and arrays
-
Server renderer supports error boundaries[doesn't make sense conceptually right now]
- Decide on whether to put
react-current-owner
in its own package to reduce issues caused by npm duplication [not now] - Decide on DOMServer entry points (
react-dom/server
andreact-dom/node-stream
seem inconsistent with each other. Why is only one of themserver
?) (@gaearon) Use single entry point for SSR via browser field #10362- These were configured separately for Prepack. One target includes both the pure JS APIs and the Node APIs and the other only includes the pure JS APIs. We could combine them into a single
react-dom/server
entry point and add a newrenderToString
method on it.
- These were configured separately for Prepack. One target includes both the pure JS APIs and the Node APIs and the other only includes the pure JS APIs. We could combine them into a single
- Decide: Do we care about catching errors in events in the initial release? [no]
- Error messages (@flarnie) (Dan: I moved this back to blockers because I don't think we can release with unclear messages. Error boundaries are a huge change in open source and we must have documentation and a link before we start unmounting roots.)
- "You can add an error boundary" message should link to docs
- duplicate key warning for children with same keys is out of date; claims child will be ignored but now we will only render second one. (easy to add to 16 final or sooner) (@sebmarkbage)
- Verify that the bundles produced are valid in strict mode. React 16 RC #10294 (comment) (@bvaughn)
- Testing the Beta: (React team in general)
- Share the beta and proposed release date with library authors several weeks in advance
- Triage any issues reported with beta.