How to use the framework/component/Async.Async function in framework

To help you get started, we’ve selected a few framework examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vocoWone / reaux / src / module / main / component / MainLayout.tsx View on Github external
import React from "react";
import {Switch} from "react-router-dom";
import Notfound from "component/Notfound";
import Route from "framework/component/Route";
import {Async} from "framework/component/Async";

/** common */
const Footer = Async(() => import(/* webpackChunkName:"footer" */ "module/common/footer"), "View");
const IntroHome = Async(() => import(/* webpackChunkName: "IntroHome" */ "module/intro/home"), "View");
const IntroAbout = Async(() => import(/* webpackChunkName: "IntroAbout" */ "module/intro/about"), "View");
const IntroResume = Async(() => import(/* webpackChunkName: "IntroResume" */ "module/intro/resume"), "View");

/** module */

const NoteList = Async(() => import(/* webpackChunkName:"noteList" */ "module/note/list"), "View");
const NoteDetail = Async(() => import(/* webpackChunkName: "noteDetail" */ "module/note/detail"), "View");

class Component extends React.PureComponent {
    render() {
        return (
            <div>
                {/* TODO: IE浏览器不支持 <main> */}
                <main>
                    
                </main></main></div>
github vocoWone / reaux / src / module / main / component / MainLayout.tsx View on Github external
// Why unable to use import() with magic comments
// Ref: https://github.com/airbnb/babel-plugin-dynamic-import-webpack/issues/34

import React from "react";
import {Switch} from "react-router-dom";
import Notfound from "component/Notfound";
import Route from "framework/component/Route";
import {Async} from "framework/component/Async";

/** common */
const Footer = Async(() =&gt; import(/* webpackChunkName:"footer" */ "module/common/footer"), "View");
const IntroHome = Async(() =&gt; import(/* webpackChunkName: "IntroHome" */ "module/intro/home"), "View");
const IntroAbout = Async(() =&gt; import(/* webpackChunkName: "IntroAbout" */ "module/intro/about"), "View");
const IntroResume = Async(() =&gt; import(/* webpackChunkName: "IntroResume" */ "module/intro/resume"), "View");

/** module */

const NoteList = Async(() =&gt; import(/* webpackChunkName:"noteList" */ "module/note/list"), "View");
const NoteDetail = Async(() =&gt; import(/* webpackChunkName: "noteDetail" */ "module/note/detail"), "View");

class Component extends React.PureComponent {
    render() {
        return (
            <div>
                {/* TODO: IE浏览器不支持 <main> */}
                <main>
                    </main></main></div>
github vocoWone / reaux / src / module / main / component / MainLayout.tsx View on Github external
// Why unable to use import() with magic comments
// Ref: https://github.com/airbnb/babel-plugin-dynamic-import-webpack/issues/34

import React from "react";
import {Switch} from "react-router-dom";
import Notfound from "component/Notfound";
import Route from "framework/component/Route";
import {Async} from "framework/component/Async";

/** common */
const Footer = Async(() =&gt; import(/* webpackChunkName:"footer" */ "module/common/footer"), "View");
const IntroHome = Async(() =&gt; import(/* webpackChunkName: "IntroHome" */ "module/intro/home"), "View");
const IntroAbout = Async(() =&gt; import(/* webpackChunkName: "IntroAbout" */ "module/intro/about"), "View");
const IntroResume = Async(() =&gt; import(/* webpackChunkName: "IntroResume" */ "module/intro/resume"), "View");

/** module */

const NoteList = Async(() =&gt; import(/* webpackChunkName:"noteList" */ "module/note/list"), "View");
const NoteDetail = Async(() =&gt; import(/* webpackChunkName: "noteDetail" */ "module/note/detail"), "View");

class Component extends React.PureComponent {
    render() {
        return (
            <div>
                {/* TODO: IE浏览器不支持 <main> */}
                <main>
                    </main></main></div>
github vocoWone / reaux / src / module / main / component / MainLayout.tsx View on Github external
import React from "react";
import {Switch} from "react-router-dom";
import Notfound from "component/Notfound";
import Route from "framework/component/Route";
import {Async} from "framework/component/Async";

/** common */
const Footer = Async(() =&gt; import(/* webpackChunkName:"footer" */ "module/common/footer"), "View");
const IntroHome = Async(() =&gt; import(/* webpackChunkName: "IntroHome" */ "module/intro/home"), "View");
const IntroAbout = Async(() =&gt; import(/* webpackChunkName: "IntroAbout" */ "module/intro/about"), "View");
const IntroResume = Async(() =&gt; import(/* webpackChunkName: "IntroResume" */ "module/intro/resume"), "View");

/** module */

const NoteList = Async(() =&gt; import(/* webpackChunkName:"noteList" */ "module/note/list"), "View");
const NoteDetail = Async(() =&gt; import(/* webpackChunkName: "noteDetail" */ "module/note/detail"), "View");

class Component extends React.PureComponent {
    render() {
        return (
            <div>
                {/* TODO: IE浏览器不支持 <main> */}
                <main>
                    </main></main></div>
github vocoWone / reaux / src / module / main / component / MainLayout.tsx View on Github external
// Why unable to use import() with magic comments
// Ref: https://github.com/airbnb/babel-plugin-dynamic-import-webpack/issues/34

import React from "react";
import {Switch} from "react-router-dom";
import Notfound from "component/Notfound";
import Route from "framework/component/Route";
import {Async} from "framework/component/Async";

/** common */
const Footer = Async(() =&gt; import(/* webpackChunkName:"footer" */ "module/common/footer"), "View");
const IntroHome = Async(() =&gt; import(/* webpackChunkName: "IntroHome" */ "module/intro/home"), "View");
const IntroAbout = Async(() =&gt; import(/* webpackChunkName: "IntroAbout" */ "module/intro/about"), "View");
const IntroResume = Async(() =&gt; import(/* webpackChunkName: "IntroResume" */ "module/intro/resume"), "View");

/** module */

const NoteList = Async(() =&gt; import(/* webpackChunkName:"noteList" */ "module/note/list"), "View");
const NoteDetail = Async(() =&gt; import(/* webpackChunkName: "noteDetail" */ "module/note/detail"), "View");

class Component extends React.PureComponent {
    render() {
        return (
            <div>
                {/* TODO: IE浏览器不支持 <main> */}
                <main>
                    </main></main></div>
github vocoWone / reaux / src / module / main / component / MainLayout.tsx View on Github external
// Why unable to use import() with magic comments
// Ref: https://github.com/airbnb/babel-plugin-dynamic-import-webpack/issues/34

import React from "react";
import {Switch} from "react-router-dom";
import Notfound from "component/Notfound";
import Route from "framework/component/Route";
import {Async} from "framework/component/Async";

/** common */
const Footer = Async(() =&gt; import(/* webpackChunkName:"footer" */ "module/common/footer"), "View");
const IntroHome = Async(() =&gt; import(/* webpackChunkName: "IntroHome" */ "module/intro/home"), "View");
const IntroAbout = Async(() =&gt; import(/* webpackChunkName: "IntroAbout" */ "module/intro/about"), "View");
const IntroResume = Async(() =&gt; import(/* webpackChunkName: "IntroResume" */ "module/intro/resume"), "View");

/** module */

const NoteList = Async(() =&gt; import(/* webpackChunkName:"noteList" */ "module/note/list"), "View");
const NoteDetail = Async(() =&gt; import(/* webpackChunkName: "noteDetail" */ "module/note/detail"), "View");

class Component extends React.PureComponent {
    render() {
        return (
            <div>
                {/* TODO: IE浏览器不支持 <main> */}
                <main>
                    </main></main></div>