Skip to main content


Showing posts from April, 2020

New advanced features of Reactjs 16+ version

New advanced features of Reactjs 16+ version There are many new advanced features introduce by Facebook in Reactjs 16+ version. 1. Code-Splitting  2. Error Boundaries 3. Context 4. Profiler 5. Static Type Checking 6. Fragments 7. Strict Mode 8. Portals 9. Forwarding Refs 10. Web Components Code-Splitting First question comes in mind why do we need code-splitting. Bundling is a great and web application use bundling mechanism. As your app grows, your bundle will grow too. You need to take care about bundle side to avoid to takes long time to load app.  In general you can split your bundle by using webpack or other tool. But reactjs 16 provides many ways to code-split into bundles. React.lazy React.lazy function lets you render a dynamic import as a regular component. Imported component will render on demand. import React from "react"; //before import TestComponent from "./TestComponent"; //After const TestCompone