UNPKG

539 BJavaScriptView Raw
1import * as React from 'react';
2
3class SceneComponent extends React.PureComponent {
4 render() {
5 const {
6 component,
7 ...rest
8 } = this.props;
9 return /*#__PURE__*/React.createElement(component, rest);
10 }
11
12}
13
14export default function SceneMap(scenes) {
15 return ({
16 route,
17 jumpTo,
18 position
19 }) => /*#__PURE__*/React.createElement(SceneComponent, {
20 key: route.key,
21 component: scenes[route.key],
22 route: route,
23 jumpTo: jumpTo,
24 position: position
25 });
26}
27//# sourceMappingURL=SceneMap.js.map
\No newline at end of file