src/components/AsyncComponent/index.js
// Call the imported component and save it in the state
Call the imported component and save it in the state
Call the imported component and save it in the state
async componentDidMount() {
      const { default: component } = await importComponent();
      this.setState({
        component,
      });
    }
async componentDidMount ( ) { const { default : component } = await importComponent ( ) ; this . setState ( { component , } ) ; }
Call the imported component and save it in the state
Call the imported component and save it in the state