Updating how initial state is set

This commit is contained in:
Jeff Avallone 2018-02-17 16:14:59 -05:00
parent 13dc496a02
commit 6c4972e726
3 changed files with 6 additions and 15 deletions

View File

@ -4,11 +4,8 @@ import PropTypes from 'prop-types';
import RavenError from 'components/RavenError'; import RavenError from 'components/RavenError';
class RavenBoundary extends React.Component { class RavenBoundary extends React.Component {
constructor() { state = {
super();
this.state = {
error: null error: null
};
} }
componentDidCatch(error, errorInfo) { componentDidCatch(error, errorInfo) {

View File

@ -13,11 +13,8 @@ class HorizontalLayout extends Base {
spacing: 10 spacing: 10
} }
constructor(props) { state = {
super(props);
this.state = {
childTransforms: List() childTransforms: List()
};
} }
updateChildTransforms(childBoxes) { updateChildTransforms(childBoxes) {

View File

@ -15,11 +15,8 @@ class VerticalLayout extends Base {
spacing: 10 spacing: 10
} }
constructor(props) { state = {
super(props);
this.state = {
childTransforms: List() childTransforms: List()
};
} }
updateChildTransforms(childBoxes) { updateChildTransforms(childBoxes) {