Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// @noflow
import React from 'react';
import Router, {Route, Switch, Link} from 'fusion-plugin-react-router';
import {split} from 'fusion-react';
const LoadingComponent = () => <div>;
const ErrorComponent = () => <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>
// @noflow
import React from 'react';
import {split} from 'fusion-react';
const LoadingComponent = () => <div>Loading...</div>;
const ErrorComponent = () => <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,
import React from 'react';
import {split} from 'fusion-react';
const LoadingComponent = () => <div>;
const ErrorComponent = () => <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>
import React from 'react';
import Router, {Route, Switch, Link} from 'fusion-plugin-react-router';
import {split} from 'fusion-react';
const LoadingComponent = () => <div>;
const ErrorComponent = () => <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>