From 6c4972e726eeb3d70ccecb9e486c1dd013fd1070 Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Sat, 17 Feb 2018 16:14:59 -0500 Subject: [PATCH] Updating how initial state is set --- src/components/RavenBoundary/index.js | 7 ++----- src/components/SVG/HorizontalLayout.js | 7 ++----- src/components/SVG/VerticalLayout.js | 7 ++----- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/components/RavenBoundary/index.js b/src/components/RavenBoundary/index.js index 9961ba7..a0eb78c 100644 --- a/src/components/RavenBoundary/index.js +++ b/src/components/RavenBoundary/index.js @@ -4,11 +4,8 @@ import PropTypes from 'prop-types'; import RavenError from 'components/RavenError'; class RavenBoundary extends React.Component { - constructor() { - super(); - this.state = { - error: null - }; + state = { + error: null } componentDidCatch(error, errorInfo) { diff --git a/src/components/SVG/HorizontalLayout.js b/src/components/SVG/HorizontalLayout.js index d7d0fbc..579ded6 100644 --- a/src/components/SVG/HorizontalLayout.js +++ b/src/components/SVG/HorizontalLayout.js @@ -13,11 +13,8 @@ class HorizontalLayout extends Base { spacing: 10 } - constructor(props) { - super(props); - this.state = { - childTransforms: List() - }; + state = { + childTransforms: List() } updateChildTransforms(childBoxes) { diff --git a/src/components/SVG/VerticalLayout.js b/src/components/SVG/VerticalLayout.js index 30f94eb..d40174e 100644 --- a/src/components/SVG/VerticalLayout.js +++ b/src/components/SVG/VerticalLayout.js @@ -15,11 +15,8 @@ class VerticalLayout extends Base { spacing: 10 } - constructor(props) { - super(props); - this.state = { - childTransforms: List() - }; + state = { + childTransforms: List() } updateChildTransforms(childBoxes) {