fusion-cli
Version:
27 lines (23 loc) • 609 B
JavaScript
// @noflow
import React from 'react';
import Router, {Route, Switch, Link} from 'fusion-plugin-react-router';
import {Translate} from 'fusion-plugin-i18n-react';
import routes from './routes';
export default function Root() {
return (
<div>
<Translate id="main" />
<Link id="split1-link" to="/split1">
go to /split1 route
</Link>
<Link id="split2-link" to="/split2">
go to /split2 route
</Link>
<Switch>
{routes.map(({path, ...props}) => (
<Route key={path} path={path} {...props} />
))}
</Switch>
</div>
);
}