diff --git a/.babelrc b/.babelrc
index 90ff9fc..47cb975 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,4 +1,10 @@
{
- "presets": ["es2015", "stage-0", "react"],
- "plugins": ["transform-decorators-legacy"]
+ "presets": [
+ "@babel/preset-env",
+ "@babel/preset-stage-0",
+ "@babel/preset-react"
+ ],
+ "plugins": [
+ "transform-decorators-legacy"
+ ]
}
diff --git a/.gitignore b/.gitignore
index a4fd317..b5d76fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,5 @@ node_modules
npm-debug.log
.DS_Store
lib
-.idea
\ No newline at end of file
+.idea
+yarn-error.log
diff --git a/.npmignore b/.npmignore
index def1012..2ba22c3 100644
--- a/.npmignore
+++ b/.npmignore
@@ -4,3 +4,4 @@ demo
.*
server.js
webpack.config.js
+yarn-error.log
diff --git a/demo/static/bundle.js b/demo/static/bundle.js
index 2e34f43..d305ab7 100644
--- a/demo/static/bundle.js
+++ b/demo/static/bundle.js
@@ -1,23 +1,24 @@
-!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var t={};return n.m=e,n.c=t,n.p="static/",n(0)}([function(module,exports,__webpack_require__){eval("module.exports = __webpack_require__(111);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** multi main\n ** module id = 0\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///multi_main?")},function(module,exports,__webpack_require__){eval("/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule invariant\n */\n\n\"use strict\";\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (false) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n 'Invariant Violation: ' +\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react/lib/invariant.js\n ** module id = 1\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/react/lib/invariant.js?")},function(module,exports){eval("/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule Object.assign\n */\n\n// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign\n\n'use strict';\n\nfunction assign(target, sources) {\n if (target == null) {\n throw new TypeError('Object.assign target cannot be null or undefined');\n }\n\n var to = Object(target);\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {\n var nextSource = arguments[nextIndex];\n if (nextSource == null) {\n continue;\n }\n\n var from = Object(nextSource);\n\n // We don't currently support accessors nor proxies. Therefore this\n // copy cannot throw. If we ever supported this then we must handle\n // exceptions and side-effects. We don't support symbols so they won't\n // be transferred.\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n }\n\n return to;\n}\n\nmodule.exports = assign;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react/lib/Object.assign.js\n ** module id = 2\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/react/lib/Object.assign.js?")},function(module,exports,__webpack_require__){eval("/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactElement\n */\n\n'use strict';\n\nvar ReactContext = __webpack_require__(52);\nvar ReactCurrentOwner = __webpack_require__(13);\n\nvar assign = __webpack_require__(2);\nvar warning = __webpack_require__(4);\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true\n};\n\n/**\n * Warn for mutations.\n *\n * @internal\n * @param {object} object\n * @param {string} key\n */\nfunction defineWarningProperty(object, key) {\n Object.defineProperty(object, key, {\n\n configurable: false,\n enumerable: true,\n\n get: function() {\n if (!this._store) {\n return null;\n }\n return this._store[key];\n },\n\n set: function(value) {\n ( false ? warning(\n false,\n 'Don\\'t set the %s property of the React element. Instead, ' +\n 'specify the correct value when initially creating the element.',\n key\n ) : null);\n this._store[key] = value;\n }\n\n });\n}\n\n/**\n * This is updated to true if the membrane is successfully created.\n */\nvar useMutationMembrane = false;\n\n/**\n * Warn for mutations.\n *\n * @internal\n * @param {object} element\n */\nfunction defineMutationMembrane(prototype) {\n try {\n var pseudoFrozenProperties = {\n props: true\n };\n for (var key in pseudoFrozenProperties) {\n defineWarningProperty(prototype, key);\n }\n useMutationMembrane = true;\n } catch (x) {\n // IE will fail on defineProperty\n }\n}\n\n/**\n * Base constructor for all React elements. This is only used to make this\n * work with a dynamic instanceof check. Nothing should live on this prototype.\n *\n * @param {*} type\n * @param {string|object} ref\n * @param {*} key\n * @param {*} props\n * @internal\n */\nvar ReactElement = function(type, key, ref, owner, context, props) {\n // Built-in properties that belong on the element\n this.type = type;\n this.key = key;\n this.ref = ref;\n\n // Record the component responsible for creating this element.\n this._owner = owner;\n\n // TODO: Deprecate withContext, and then the context becomes accessible\n // through the owner.\n this._context = context;\n\n if (false) {\n // The validation flag and props are currently mutative. We put them on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n this._store = {props: props, originalProps: assign({}, props)};\n\n // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n try {\n Object.defineProperty(this._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true\n });\n } catch (x) {\n }\n this._store.validated = false;\n\n // We're not allowed to set props directly on the object so we early\n // return and rely on the prototype membrane to forward to the backing\n // store.\n if (useMutationMembrane) {\n Object.freeze(this);\n return;\n }\n }\n\n this.props = props;\n};\n\n// We intentionally don't expose the function on the constructor property.\n// ReactElement should be indistinguishable from a plain object.\nReactElement.prototype = {\n _isReactElement: true\n};\n\nif (false) {\n defineMutationMembrane(ReactElement.prototype);\n}\n\nReactElement.createElement = function(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n\n if (config != null) {\n ref = config.ref === undefined ? null : config.ref;\n key = config.key === undefined ? null : '' + config.key;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (config.hasOwnProperty(propName) &&\n !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (typeof props[propName] === 'undefined') {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n return new ReactElement(\n type,\n key,\n ref,\n ReactCurrentOwner.current,\n ReactContext.current,\n props\n );\n};\n\nReactElement.createFactory = function(type) {\n var factory = ReactElement.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g.