diff --git a/.eslintrc b/.eslintrc
index 949b5a5..6717889 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -44,6 +44,7 @@
"no-plusplus": "off",
"no-ternary": "off",
"no-undefined": "off",
+ "no-unused-vars": ["error", { "varsIgnorePattern": "h" }],
"no-use-before-define": "off",
"no-warning-comments": "off",
"object-curly-newline": ["error", { "consistent": true }],
@@ -65,5 +66,6 @@
"react/jsx-indent": ["error", 2],
"react/prop-types": "off",
+ "react/react-in-jsx-scope": "off"
}
}
diff --git a/src/settings/components/index.jsx b/src/settings/components/index.jsx
index 4418942..bb2045a 100644
--- a/src/settings/components/index.jsx
+++ b/src/settings/components/index.jsx
@@ -1,10 +1,9 @@
import './site.scss';
-import React from 'react';
-import PropTypes from 'prop-types';
+import { h, Component } from 'preact';
import * as settingActions from 'settings/actions/setting';
import * as validator from 'shared/validators/setting';
-class SettingsComponent extends React.Component {
+class SettingsComponent extends Component {
constructor(props, context) {
super(props, context);
@@ -84,8 +83,4 @@ class SettingsComponent extends React.Component {
}
}
-SettingsComponent.contextTypes = {
- store: PropTypes.any,
-};
-
export default SettingsComponent;
diff --git a/src/settings/index.jsx b/src/settings/index.jsx
index 7516fb7..eb251b4 100644
--- a/src/settings/index.jsx
+++ b/src/settings/index.jsx
@@ -1,5 +1,4 @@
-import React from 'react';
-import ReactDOM from 'react-dom';
+import { h, render } from 'preact';
import SettingsComponent from './components';
import reducer from 'settings/reducers/setting';
import Provider from 'shared/store/provider';
@@ -9,7 +8,7 @@ const store = createStore(reducer);
document.addEventListener('DOMContentLoaded', () => {
let wrapper = document.getElementById('vimvixen-settings');
- ReactDOM.render(
+ render(