React fiber is the version 2 for react framework a complete rewrite for react. More advance approachable and fast framework, we bet react fiber is faster than any web framework in market now.
React Fiber is an ongoing re implementation of React’s core algorithm. It is the culmination of over two years of research by the React team.
The goal of React Fiber is to increase its suitability for areas like animation, layout, and gestures. Its headline feature is incremental rendering: the ability to split rendering work into chunks and spread it out over multiple frames.
Other key features include the ability to pause, abort, or reuse work as new updates come in the ability to assign priority to different types of updates; and new concurrency primitives.
WHY FACEBOOK REWRITE REACT?
- Scheduling – Controls both how and when to update your UI
- User Events (clicks, form input change)
- External data subscriptions (Redux)
- Animations (transitions, Gestures)
What happened in React
- Interrupt the current, lower priority work
- Complete the high priority work
- Resume the interrupted work where it left of
In React Fiber
- Interrupt Current rendering call stack
- Stash the call stack off to the side
- perform some high priority work, which has its own stack
- Go back to original stack and resume
- Integrated Layout
- return multiple elements from render
- cleanup codebase, make contributions easy
React Fiber will be backward compatible with all react updates, which is a very interesting news for developers. Render the right stuff at the right time 🙂