I just heard that react-fiber is ready. What is the big differences between react and react-fiber? Is it worth it to learn the whole new concept for that differences ?
I just heard that react-fiber is ready. What is the big differences between react and react-fiber? Is it worth it to learn the whole new concept for that differences ?
React Fiber is an ongoing reimplementation of React's core algorithm. The main difference between react and react fiber are these new features :-
Incremental Rendering :- React v16.0 includes a completely rewritten server renderer. It’s really fast. It supports streaming, so you can start sending bytes to the client faster
Handle errors in the render API : To make class component an error boundary we define a new lifecycle method called componentDidCatch(error, info).
Return multiple elements from render : With this new feature in React v16.0 now we can also return an array of elements, and string from component’s render method.
Portals : Portals provide a first-class way to render children into a DOM node that exists outside the DOM hierarchy of the parent component.
Fragments : A common pattern in React is for a component to return multiple elements. Fragments let you group a list of children without adding extra nodes to the DOM.