Calling PropTypes validation directly is a deprecated feature in React 15
Opened this issue · 5 comments
ActionCreator.validatePayload calls PropTypes directly which is now a deprecated feature:
https://facebook.github.io/react/warnings/dont-call-proptypes.html
The alternative is:
a) remove this feature from FluxThis
b) use one of the third party libraries that duplicates PropTypes logic suggested in the Facbeook post above
Actually just read into the code and noticed it's already deprecated:
deprecated( description.payloadType, 'ActionCreator.Action.payloadType', 'ActionCreator.Action.payload' );
Should we remove PropTypes before React 16 is released?
Feel free to submit a PR @selzaharna
We should not remove validation but rather move to another library.
Note that the new prop-types
package does support validation of PropTypes via the checkPropTypes
method (see https://github.com/facebook/prop-types). I'll try to create a PR which uses this instead
Seems this has already been resolved 👍