PHP Library for REST API Multiple-Request Chaining - In Dev
Yet another snake game
Tetris game implementation using Unity3D
Сборщик расширений UMI.CMS
Statistics collector of XSLT-files
fork in 24 days
createClass is executed and there is
getDefaultProps in the spec and we are not in production mode, then we approve that
getDefaultProps is intentional. As was mentioned before we approve react class only in development mode, because of performance reasons, so we cannot approve it in any environment.
I think the problem is not in mixing development and production versions, but in relying on
isReactClassApproved property. The error message says that:
getDefaultProps is only used on classic React.createClass definitions, so from logic of the message we should warn only if we have
getDefaultProps and element was created not from
React.createClass, despite the fact of mixing environments.
The table below describes different states and where bug occurs.
|prod||dev||- (no check)|
|prod||prod||- (no check)|
I have two possible ways in mind of how to fix that bug:
- We can indicate that type was created from
React.createClassby adding some property (like
__fromCreateClass) to type on any environment and then check that property exists instead of
- From definition of
React.createClass, if the spec has
getDefaultPropsthen we execute that function and set its return value to
defaultPropsproperty. We could remove that function from
defaultPropsif that won't hurt compatibility with older versions.
The question is how we suppose to fix this if there is no
master branch, but only in branch
comment created time in 25 days
created time in 5 months
commit sha 51379891280f2671794f561f18a71d7828fcb650
push time in 5 months