function WithAsyncComponent()

in fusion-react/src/async/split.js [43:65]


  function WithAsyncComponent(props) {
    if (__BROWSER__) {
      let promise = load();
      // $FlowFixMe
      let id = promise.__MODULE_ID;

      if (
        typeof __webpack_modules__ !== 'undefined' &&
        __webpack_modules__[id]
      ) {
        // If module is already loaded, it can be synchronously imported
        AsyncComponent = __webpack_require__(id).default;
      }
    }

    if (error) {
      return <ErrorComponent error={error} />;
    }
    if (!AsyncComponent) {
      return <LoadingComponent />;
    }
    return <AsyncComponent {...props} />;
  }