mhaagens / react-mobx-react-router4-boilerplate

React, React-Router 4, MobX and Webpack 2-boilerplate with async routes.
560 stars 137 forks source link

Fix Protected decorator name collision #45

Closed aldarund closed 7 years ago

aldarund commented 7 years ago

Right now there is a name collision in Protected decorator. It have a Component as argument and then extends Component which is supposed to be a react Component but instead we extending Component passed to that decorator. This will lead to numerous problems, for example if there also inject decorator with Protected decorator it will lead to either double componentDidMount or warning.