Skip to content

Commit

Permalink
Remove decorators dependency
Browse files Browse the repository at this point in the history
The lib shouldn't depend on Decorators, that should be a developer option because required the Babel transpiler to support decorators
  • Loading branch information
giulianok authored Jul 4, 2017
1 parent 477757b commit 99ef113
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,12 @@ Actions.iterate = (root: Scene, parentProps = {}, refsParam = {}, wrapBy) => {
return originalIterate({...root, props: {...root.props, type}}, parentProps, refsParam, wrapBy);
}

@observer
class Router extends React.Component {
render() {
const {navBar, ...newProps} = this.props;
if (navBar) {
newProps.navBar = observer(navBar);
}
return <OriginalRouter wrapBy={observer} {...newProps}/>
const Router = observer(({navBar, ...newProps}) => {
if (navBar) {
newProps.navBar = observer(navBar);
}
}
return <OriginalRouter wrapBy={observer} {...newProps}/>
})

export {
Actions,
Expand Down

0 comments on commit 99ef113

Please sign in to comment.