diff --git a/.babelrc b/.babelrc index 6763fb5..57d1d41 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,4 @@ { - "presets": [ "es2015", "react" ] + "presets": [ "es2015" ], + "plugins": [ "inferno" ] } \ No newline at end of file diff --git a/package.json b/package.json index 0d470f4..a28c709 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,8 @@ "dependencies": { "babel-polyfill": "^6.13.0", "bulma": "^0.2.3", + "inferno": "^1.0.3", + "inferno-component": "^1.0.3", "json-query": "^2.2.0", "marked": "^0.3.6", "papaparse": "^4.1.2", @@ -33,6 +35,7 @@ "devDependencies": { "babel-core": "^6.14.0", "babel-loader": "^6.2.5", + "babel-plugin-inferno": "^1.4.0", "babel-preset-es2015": "^6.14.0", "babel-preset-react": "^6.11.1", "css-loader": "^0.25.0", diff --git a/src/components/Button.jsx b/src/components/Button.jsx index ae3b583..8284f4e 100644 --- a/src/components/Button.jsx +++ b/src/components/Button.jsx @@ -1,7 +1,10 @@ -import React from 'react'; +// import React from 'react'; +import Inferno from 'inferno'; +import Component from 'inferno-component'; // Creates a clickable tag with an onclick action. -export class Button extends React.Component { +// export class Button extends React.Component { +export class Button extends Component { constructor(props) { super(props); } diff --git a/src/components/Checkbox.jsx b/src/components/Checkbox.jsx index c1d16c8..4fb14e4 100644 --- a/src/components/Checkbox.jsx +++ b/src/components/Checkbox.jsx @@ -1,4 +1,5 @@ -import React from 'react'; +// import React from 'react'; +import Inferno from 'inferno'; import {Input} from './Input'; export class Checkbox extends Input { @@ -25,7 +26,7 @@ export class Checkbox extends Input { {this.props.name} {this.showHelperLink()} - + ); } diff --git a/src/components/Dictionary.jsx b/src/components/Dictionary.jsx index b297a7b..b55258b 100644 --- a/src/components/Dictionary.jsx +++ b/src/components/Dictionary.jsx @@ -1,9 +1,12 @@ -import React from 'react'; +// import React from 'react'; +import Inferno from 'inferno'; +import Component from 'inferno-component'; import {Word} from './Word'; // A component for showing just the list of words provided to it as a prop. -export class Dictionary extends React.Component { +// export class Dictionary extends React.Component { +export class Dictionary extends Component { constructor(props) { super(props); } @@ -33,7 +36,7 @@ export class Dictionary extends React.Component { render() { return ( -
+
{this.showWords()}
); diff --git a/src/components/Dropdown.jsx b/src/components/Dropdown.jsx index 11fb24c..f6ce890 100644 --- a/src/components/Dropdown.jsx +++ b/src/components/Dropdown.jsx @@ -1,4 +1,5 @@ -import React from 'react'; +// import React from 'react'; +import Inferno from 'inferno'; import {Input} from './Input'; import {htmlEntities} from '../js/helpers'; @@ -39,11 +40,15 @@ export class Dropdown extends Input { render() { return ( -