Use the documented syntax for default props in CreateReactClass

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2019-08-05 10:08:07 +01:00
parent 64d542dc4a
commit debc124714
3 changed files with 6 additions and 6 deletions

View file

@ -49,10 +49,10 @@ export default React.createClass({
onFinished: PropTypes.func.isRequired,
},
defaultProps: {
getDefaultProps: () => ({
danger: false,
askReason: false,
},
}),
componentWillMount: function() {
this._reasonField = null;

View file

@ -44,10 +44,10 @@ module.exports = React.createClass({
hide: PropTypes.bool, // If rendered, should apps drawer be visible
},
defaultProps: {
getDefaultProps: () => ({
showApps: true,
hide: false,
},
}),
getInitialState: function() {
return {

View file

@ -57,10 +57,10 @@ module.exports = React.createClass({
fullHeight: PropTypes.bool,
},
defaultProps: {
getDefaultProps: () => ({
showApps: true,
hideAppsDrawer: false,
},
}),
getInitialState: function() {
return { counters: this._computeCounters() };