{"size": 310, "ext": "js", "max_stars_repo_path": "Chapter10/dynamic-imports-and-bundles/src/App.js", "max_stars_repo_name": "NeIbrahim/React-and-React-Native---Third-Edition", "max_stars_repo_stars_event_min_datetime": "2020-01-13T07:25:08.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-14T08:53:00.000Z", "max_issues_repo_path": "Chapter10/dynamic-imports-and-bundles/src/App.js", "max_issues_repo_name": "NeIbrahim/React-and-React-Native---Third-Edition", "max_issues_repo_issues_event_min_datetime": "2019-10-09T12:57:42.000Z", "max_issues_repo_issues_event_max_datetime": "2021-11-23T18:11:20.000Z", "max_forks_repo_path": "Chapter10/dynamic-imports-and-bundles/src/App.js", "max_forks_repo_name": "NeIbrahim/React-and-React-Native---Third-Edition", "max_forks_repo_forks_event_min_datetime": "2019-10-01T16:14:27.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-27T18:00:52.000Z"}
{"max_stars_count": 79, "max_issues_count": 24, "max_forks_count": 81, "avg_line_length": 22.1428571429, "max_line_length": 67, "alphanum_fraction": 0.5903225806}
import React, { useState, useEffect } from "react";

export default function App() {
  const [MyComponent, setMyComponent] = useState(() => () => null);

  useEffect(() => {
    import("./MyComponent").then(module => {
      setMyComponent(() => module.default);
    });
  }, []);

  return <MyComponent />;
}
