Skip to content

Commit

Permalink
Use export default from syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Dec 14, 2018
1 parent d70699b commit d2ab0e8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 21 deletions.
1 change: 1 addition & 0 deletions .babelrc
Expand Up @@ -4,6 +4,7 @@
],
"plugins": [
"@babel/proposal-class-properties",
"@babel/proposal-export-default-from",
["@babel/transform-react-jsx", {
"pragmaFrag": "React.Fragment"
}]
Expand Down
2 changes: 1 addition & 1 deletion src/Diagram.jsx
Expand Up @@ -32,7 +32,7 @@ export default class Diagram extends Component {

async loadDiagramElements() {
const { reactVersion } = this.props;
const diagramElements = (await diagramVersions[reactVersion]).default;
const diagramElements = (await diagramVersions[reactVersion]);

this.setState({ diagramElements });
}
Expand Down
13 changes: 3 additions & 10 deletions src/versions/16.3/index.js
@@ -1,10 +1,3 @@
import Mounting from './Mounting';
import Updating from './Updating';
import Unmounting from './Unmounting';

/* eslint-disable sort-keys */
export default {
Mounting,
Updating,
Unmounting,
};
export Mounting from './Mounting';
export Updating from './Updating';
export Unmounting from './Unmounting';
13 changes: 3 additions & 10 deletions src/versions/16.4/index.js
@@ -1,10 +1,3 @@
import Mounting from './Mounting';
import Updating from './Updating';
import Unmounting from './Unmounting';

/* eslint-disable sort-keys */
export default {
Mounting,
Updating,
Unmounting,
};
export Mounting from './Mounting';
export Updating from './Updating';
export Unmounting from './Unmounting';

0 comments on commit d2ab0e8

Please sign in to comment.