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
+2 -5
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(); error: null
this.state = {
error: null
};
} }
componentDidCatch(error, errorInfo) { componentDidCatch(error, errorInfo) {
+2 -5
View File
@@ -13,11 +13,8 @@ class HorizontalLayout extends Base {
spacing: 10 spacing: 10
} }
constructor(props) { state = {
super(props); childTransforms: List()
this.state = {
childTransforms: List()
};
} }
updateChildTransforms(childBoxes) { updateChildTransforms(childBoxes) {
+2 -5
View File
@@ -15,11 +15,8 @@ class VerticalLayout extends Base {
spacing: 10 spacing: 10
} }
constructor(props) { state = {
super(props); childTransforms: List()
this.state = {
childTransforms: List()
};
} }
updateChildTransforms(childBoxes) { updateChildTransforms(childBoxes) {