UNPKG

piral-core

Version:

The core library for creating a Piral instance.

9 lines 509 B
import * as React from 'react'; import { Switch, Route } from 'react-router'; export const DefaultRouteSwitch = ({ paths, NotFound, ...props }) => { return (React.createElement(Switch, { ...props }, paths.map(({ path, Component }) => (React.createElement(Route, { exact: true, key: path, path: path, component: Component }))), React.createElement(Route, { component: NotFound }))); }; DefaultRouteSwitch.displayName = 'DefaultRouteSwitch'; //# sourceMappingURL=DefaultRouteSwitch_v5.js.map