react-gradual-upgrade-demo
fastdom
Our great sponsors
react-gradual-upgrade-demo | fastdom | |
---|---|---|
9 | 4 | |
420 | 6,772 | |
0.2% | - | |
0.0 | 2.9 | |
over 1 year ago | 2 months ago | |
JavaScript | JavaScript | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
react-gradual-upgrade-demo
-
Node module issues when gradually upgrading to React 17 from React 15
I've run into a weird issue when trying to gradually upgrade. If you don't know, React Gradual upgrade is a fun process where you require three package.json's - one in the root directory, one in src/legacy and one in src/modern. Refer to here for more info: GitHub I am getting the errors after running npm start ("webpack-dev-server --hot"):
-
TodoMVC App Written in Vanilla JavaScript
The event listeners get cleaned up by the GC. At least in modern browsers.
While events aren’t explicitly mentioned, MDN offers an insightful read:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memo...
Alternately, one can use event delegation [0]. As does React under the hood [1].
0 - https://javascript.info/event-delegation
1 - https://reactjs.org/blog/2020/08/10/react-v17-rc.html#change...
-
Enzyme is dead. Now what?
React 17 Release Candidate came out. Shortly after, an issue has been raised in Enzyme repository to add support for React 17. Immediately after, @layershifter has opened a PR adding an official enzyme-adapter-react-17.
-
React 17 runs useEffect cleanup functions asynchronously
Yes, the React core team discussed that in their blog post on the release candidate of v.17, and advised those who really need synchronous cleanup to use the useLayoutEffect.
-
The Plan for React 18
React 17 included quite a bit of that work. Most of the event system was simplified/rewritten, pooling was removed, and delegation moved to the root.
-
React 17 DOM tree inside of React 16.2 DOM
Is it possible to do the reverse of the demo? - https://github.com/reactjs/react-gradual-upgrade-demo/
-
Two versions in the same web app
See https://github.com/reactjs/react-gradual-upgrade-demo
-
React.js 17: No New Features and New JSX Transform
You can take a look at a demo of gradual updates on an example repository put together by the React team.
-
What’s new in React v17.0 ?
Checkout the demo for gradual upgrade.
fastdom
-
If Web Components are so great, why am I not using them?
Now, every time we read `offsetHeight`, the browser sees that it has a scheduled DOM modification to apply, so it has to apply that first, before it can return a correct value.
This is the reason that libraries like fastdom (https://github.com/wilsonpage/fastdom) exist - they help ensure that, in a given tick, all the reads happen first, followed by all the writes.
That said, I suspect even if you add a write followed by a read to your `while(1)` experiment, it still won't actually render anything, because painting is a separate phase of the rendering process, which always happens asynchronously. But that might not be true, and I'm on mobile and can't test it myself.
- TodoMVC App Written in Vanilla JavaScript
-
Notes on the Critical Rendering Path (CRP)
batching your writes & reads to the DOM (via FastDOM or a virtual DOM implementation).
-
Performance tips for JavaScript Game Developers
For more information on how and why this works, and a more robust and complete implementation, check out the FastDom library: https://github.com/wilsonpage/fastdom - note that you might not need this particular optimization if you're using a rendering framework, which should already be doing these sorts of optimisations for you.
What are some alternatives?
react-codemod - React codemod scripts
mebm - zero-dependency browser-based video editor
react-18 - Workgroup for React 18 release.
yhtml - Tiny html tag function for rendering Web Component templates with event binding