STRML / react-router-component

Declarative router component for React.
http://strml.viewdocs.io/react-router-component
MIT License
874 stars 94 forks source link

Warning: getDefaultProps #201

Closed tiagojsalmeida closed 7 years ago

tiagojsalmeida commented 7 years ago

Summary:

Error in console:

Warning: getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.

Steps to reproduce:

Expected behavior:

Should be using defaultProps.

STRML commented 7 years ago

Render any modal? Not sure what you mean. It is likely this is not an issue in RRC - we use createClass.

tiagojsalmeida commented 7 years ago

Sorry, I mean render any location.

STRML commented 7 years ago

Again, not seeing this. Please submit code or a repository that can reproduce, e.g. on https://codesandbox.io/.

tiagojsalmeida commented 7 years ago

You are right. Interesting because on my project the error is related to react-router-component but on sandbox it works fine. https://codesandbox.io/s/mGgoz5q0

STRML commented 7 years ago

Okay. Best of luck with diagnosis.