In react we can achieve lazy loading after performing some steps. Let's start Step 1:- We need to import the Suspense component - Now here I have imported Suspense component from react import React, {Component, Suspense} from 'react'; Step 2: We need to change the way of importing Component in React - Now we are importing our other components here. I'm importing the Login and register component here. - Here we are using React.lazy() method const Register = React.lazy(() => import('./containers/auth/register/register')) const Login = React.lazy(() => import('./containers/auth/login/Login')) Step 3: Now we need to declare our routes Here we are using Suspence for declaring component. <Route path={'/'} render={() => <Suspense fallback={<div>Loading....</div>}> <Login /> </Suspense>} exact/> <Route path={'/register'} render={() => <
Welcome to "TechoSwag" in this website you will get details understanding of "Angular" all versions like "Angular 2,4,5,6,7,8,9,10,11,12" and the basic concept of "JavaScrips" and the latest "ES6" features like "Arrow Funtions", "REST Operator", "SPRED Operators", etc.... In future will cover "ReactJS", "NODEJS", "HTML/CSS", "BOOTSTRAP"