How to use the fusion-react.split function in fusion-react

To help you get started, we’ve selected a few fusion-react 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 fusionjs / fusion-cli / test / e2e / dynamic-import-app-group-preloading / fixture / src / root.js View on Github external
// @noflow

import React from 'react';
import Router, {Route, Switch, Link} from 'fusion-plugin-react-router';
import {split} from 'fusion-react';

const LoadingComponent = () =&gt; <div>;
const ErrorComponent = () =&gt; <div>;

const A = split({
  load() {
    return import('./split-a');
  },
  LoadingComponent,
  ErrorComponent,
});

const B = split({
  load() {
    return import('./split-b');
  },
  LoadingComponent,
  ErrorComponent,
});

export default function Root() {</div></div>
github fusionjs / fusion-cli / test / e2e / split-translations / fixture / src / routes.js View on Github external
// @noflow
import React from 'react';
import {split} from 'fusion-react';

const LoadingComponent = () =&gt; <div>Loading...</div>;
const ErrorComponent = () =&gt; <div>Error</div>;

export default [
  {
    path: '/split1',
    component: split({
      load() {
        return import('./split1');
      },
      LoadingComponent,
      ErrorComponent,
    }),
    exact: true,
  },
  {
    path: '/split2',
    component: split({
      load() {
        return import(/* webpackChunkName: "named-chunk" */ './split2');
      },
      LoadingComponent,
      ErrorComponent,
github fusionjs / fusion-cli / test / fixtures / dynamic-import-app / src / routes.js View on Github external
import React from 'react';
import {split} from 'fusion-react';

const LoadingComponent = () =&gt; <div>;
const ErrorComponent = () =&gt; <div>;

export default [
  {
    path: '/split-route',
    component: split({
      load() {
        return import('./split-route');
      },
      LoadingComponent,
      ErrorComponent,
    }),
    exact: true,
  },
  {
    path: '/split-route-content',
    component: split({
      load() {
        return import('./split-route-content');
      },
      LoadingComponent,
      ErrorComponent,</div></div>
github fusionjs / fusion-cli / test / e2e / dynamic-import-app-group-preloading / fixture / src / root.js View on Github external
import React from 'react';
import Router, {Route, Switch, Link} from 'fusion-plugin-react-router';
import {split} from 'fusion-react';

const LoadingComponent = () =&gt; <div>;
const ErrorComponent = () =&gt; <div>;

const A = split({
  load() {
    return import('./split-a');
  },
  LoadingComponent,
  ErrorComponent,
});

const B = split({
  load() {
    return import('./split-b');
  },
  LoadingComponent,
  ErrorComponent,
});

export default function Root() {
  return (
    <div>
      
    </div>
  );</div></div>

fusion-react

FusionJS entry point for React universal rendering

MIT
Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis

Similar packages