question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Fire: Modernizing React DOM

See original GitHub issue

For latest status, see an update from June 5th, 2019: https://github.com/facebook/react/issues/13525#issuecomment-499196939


This year, the React team has mostly been focused on fundamental improvements to React.

As this work is getting closer to completion, we’re starting to think of what the next major releases of React DOM should look like. There are quite a few known problems, and some of them are hard or impossible to fix without bigger internal changes.

We want to undo past mistakes that caused countless follow-up fixes and created much technical debt. We also want to remove some of the abstraction in the event system which has been virtually untouched since the first days of React, and is a source of much complexity and bundle size.

We’re calling this effort “React Fire”.

🔥 React Fire

React Fire is an effort to modernize React DOM. Our goal is to make React better aligned with how the DOM works, revisit some controversial past decisions that led to problems, and make React smaller and faster.

We want to ship this set of changes in a future React major release because some of them will unfortunately be breaking. Nevertheless, we think they’re worth it. And we have more than 50 thousands components at Facebook to keep us honest about our migration strategy. We can’t afford to rewrite product code except a few targeted fixes or automated codemods.

Strategy

There are a few different things that make up our current plan. We might add or remove something but here’s the thinking so far:

Tradeoffs

  • We can’t make some of these changes if we aim to keep exposing the current private React event system APIs for projects like React Native Web. However, React Native Web will need a different strategy regardless because React Fabric will likely move more of the responder system to the native side.

  • We may need to drop compatibility with some older browsers, and/or require more standalone polyfills for them. We still care about supporting IE11 but it’s possible that we will not attempt to smooth over some of the existing browser differences — which is the stance taken by many modern UI libraries.

Rollout Plan

At this stage, the project is very exploratory. We don’t know for sure if all of the above things will pan out. Because the changes are significant, we will need to dogfood them at Facebook, and try them out in a gradual fashion. This means we’ll introduce a feature flag, fork some of the code, and keep it enabled at Facebook for a small group of people. The open source 16.x releases will keep the old behavior, but on master you will be able to run it with the feature flag on.

I plan to work on the project myself for the most part, but I would very much appreciate more discussion and contributions from @nhunzaker, @aweary, @jquense, and @philipp-spiess who have been stellar collaborators and have largely steered React DOM while we were working on Fiber. If there’s some area you’re particularly interested in, please let me know and we’ll work it out.

There are likely things that I missed in this plan. I’m very open to feedback, and I hope this writeup is helpful.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3579
  • Comments:228 (70 by maintainers)

github_iconTop GitHub Comments

625reactions
felixfbeckercommented, Aug 31, 2018

I love every of these points, except the className change. It seems downright contradictory to the goal the other points are pursuing (aligning with the DOM API). React binds to DOM properties, not HTML attributes (this is this even articulated in the first point). The DOM Element property is named className, not class. So why would it be named class in React?

433reactions
ryanflorencecommented, Aug 31, 2018

className → class is fantastic

What about all the others? Seems weird to still be doing clipPath, htmlFor, tabIndex, etc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Fire: Modernizing React DOM
I love the react team for what they're doing here, but I have a feeling that the className -> class change would be...
Read more >
a new effort to modernize React DOM
Announcing React Fire: a new effort to modernize React DOM. github.com. React Fire: Modernizing React DOM · Issue #13525 · facebook/react.
Read more >
JSgen - React Fire: Modernizing React DOM...
React Fire : Modernizing React DOM · Issue #13525 · facebook/react. This year, the React team has mostly been focused on fundamental improvements...
Read more >
Modernizing React DOM" Plan by React team to more ...
"React Fire: Modernizing React DOM" Plan by React team to more closely align with DOM · SSR allows you to have a webapp...
Read more >
A Rundown Of What's Next For React With Dan Abramov
There's also discussion on React Fire modernizing React DOM, JSX v2, if React is a framework or a library, what React is intended...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found