bananaoomarang / isomorphic-redux

Isomorphic Redux demo, with routing and async actions
https://medium.com/@bananaoomarang/handcrafting-an-isomorphic-redux-application-with-love-40ada4468af4
MIT License
455 stars 87 forks source link

Fix Errors out of browser console. #43

Closed chungchiehlun closed 8 years ago

chungchiehlun commented 8 years ago

When I bootstrap the Application , there are two Errors I found in my console of browser.

A semicolon is required after a class property.

The first problem is about semicolons. The JS specification defines that a semicolon must be after a class property. In current Babel v6.3 , It doesn't auto-prefix this.

Warning: Failed propType.

When using the @connect decorator , class Home is decorated as a ConnectDecorator. When setting Home.propTypes, we're actually setting these prop types on the Connector, not on your Info component. So React is enforcing the props in the wrong place! Don't use inheritance please :-) said by Dan out of here.

Dattaya commented 8 years ago

I also use decorators, but for some reason I don't see this error Warning: Failed propType. in my fork of this repository: https://github.com/Dattaya/isomorphic-redux-plus