diff --git a/README.md b/README.md index 0ad4b6e8..76535a99 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This is a next iteration of [mobx-react](https://github.com/mobxjs/mobx-react) coming from introducing React hooks which simplifies a lot of internal workings of this package. Class based components **are not supported** except using `` directly in its `render` method. -**You need React version 16.7.0-alpha.2 or 16.8.0-alpha.0 which is highly experimental and not recommended for production.** +**You need React version 16.8.0-alpha.1 which is highly experimental and not recommended for production.** **Do not use React 16.7 as it's [missing Hooks support](https://reactjs.org/blog/2018/12/19/react-v-16-7.html)!** diff --git a/package.json b/package.json index 435c14a3..aa3824c1 100644 --- a/package.json +++ b/package.json @@ -30,12 +30,12 @@ "homepage": "https://mobxjs.github.io/mobx", "peerDependencies": { "mobx": "^4.0.0 || ^5.0.0", - "react": "16.7.0-alpha.2 || 16.8.0-alpha.0" + "react": "16.8.0-alpha.1" }, "devDependencies": { "@types/jest": "^23.3.9", "@types/node": "^10.0.0", - "@types/react": "^16.7.2", + "@types/react": "^16.8.1", "@types/react-dom": "^16.0.9", "coveralls": "^3.0.2", "husky": "^1.1.3", @@ -47,8 +47,8 @@ "lodash": "^4.17.11", "mobx": "^5.0.0", "prettier": "^1.15.2", - "react": "16.8.0-alpha.0", - "react-dom": "16.8.0-alpha.0", + "react": "16.8.0-alpha.1", + "react-dom": "16.8.0-alpha.1", "react-testing-library": "^5.2.3", "rimraf": "^2.6.2", "rollup": "^1.1.0", @@ -83,4 +83,4 @@ "pre-commit": "lint-staged" } } -} +} \ No newline at end of file diff --git a/test/observer.test.tsx b/test/observer.test.tsx index c37d85db..af139b49 100644 --- a/test/observer.test.tsx +++ b/test/observer.test.tsx @@ -414,7 +414,7 @@ test("useImperativeMethods and forwardRef should work with observer", () => { const FancyInput = observer( (props: IProps, ref: React.Ref) => { const inputRef = React.useRef(null) - React.useImperativeMethods( + React.useImperativeHandle( ref, () => ({ focus: () => { @@ -447,7 +447,7 @@ test("useImperativeMethods and forwardRef should work with useObserver", () => { const FancyInput = React.memo( React.forwardRef((props: IProps, ref: React.Ref) => { const inputRef = React.useRef(null) - React.useImperativeMethods( + React.useImperativeHandle( ref, () => ({ focus: () => { diff --git a/yarn.lock b/yarn.lock index 4340c34d..fa7164fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -78,10 +78,10 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^16.7.2": - version "16.7.20" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.7.20.tgz#13ae752c012710d0fa800985ca809814b51d3b58" - integrity sha512-Qd5RWkwl6SL7R2XzLk/cicjVQm1Mhc6HqXY5Ei4pWd1Vi8Fkbd5O0sA398x8fRSTPAuHdDYD9nrWmJMYTJI0vQ== +"@types/react@*", "@types/react@^16.8.1": + version "16.8.1" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.1.tgz#b431b104ecc6febda170b718caa9f50be66a6750" + integrity sha512-tD1ETKJcuhANOejRc/p7OgQ16DKnbGi0M3LccelKlPnUCDp2a5koVxZFoRN9HN+A+m84HB5VGN7I+r3nNhS3PA== dependencies: "@types/prop-types" "*" csstype "^2.2.0" @@ -3712,15 +3712,15 @@ rc@^1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-dom@16.8.0-alpha.0: - version "16.8.0-alpha.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.0-alpha.0.tgz#47bbcf42593eab5468b577d3c3f3c27f251a65ef" - integrity sha512-OGfLUXGxtMgqLB1BqnB9flVCvc8VvAnhQYeFr+EUzwiODcD34dPrxtfa7ccK4dwzcPi8HRLSyBcaQi2OvVoUww== +react-dom@16.8.0-alpha.1: + version "16.8.0-alpha.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.0-alpha.1.tgz#dab73b8354ba2e498e3127d18e29d4546cea889e" + integrity sha512-tZCUM8BpnwUHJmLnUWP9c3vVZxnCqYotj7s4tx7umojG6BKv745KIBtuPTzt0EI0q50GMLEpmT/CPQ8iA61TwQ== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.13.0-alpha.0" + scheduler "^0.13.0-alpha.1" react-testing-library@^5.2.3: version "5.4.4" @@ -3729,15 +3729,15 @@ react-testing-library@^5.2.3: dependencies: dom-testing-library "^3.13.1" -react@16.8.0-alpha.0: - version "16.8.0-alpha.0" - resolved "https://registry.yarnpkg.com/react/-/react-16.8.0-alpha.0.tgz#8545eb79534cce5ba99ed40085f7f955e8857a19" - integrity sha512-B/nJJkNqV4JAJQ1M0Q38ZvhZ6BoYsjyZq29hbsIIPYayn/0DcYhu7tExpfzdtTC0SnUcA+RnDBTlXTEJ5b9PEg== +react@16.8.0-alpha.1: + version "16.8.0-alpha.1" + resolved "https://registry.yarnpkg.com/react/-/react-16.8.0-alpha.1.tgz#c2b32689f3b466d3ce85a634dd9035f789d2cd97" + integrity sha512-vLwwnhM2dXrCsiQmcSxF2UdZVV5xsiXjK5Yetmy8dVqngJhQ3aw3YJhZN/YmyonxwdimH40wVqFQfsl4gSu2RA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.13.0-alpha.0" + scheduler "^0.13.0-alpha.1" read-pkg-up@^1.0.1: version "1.0.1" @@ -4096,7 +4096,7 @@ sax@^1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -scheduler@^0.13.0-alpha.0: +scheduler@^0.13.0-alpha.1: version "0.13.0-alpha.1" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.0-alpha.1.tgz#753977fb4fb35d8cdd559868a11e46b640955556" integrity sha512-W0sH0848sVuPKg+I18vTYQyzVtA4X1lrVgSeXK6KnOPUltFdJcY5nkbTkjGUeS/E0x+eBsNYfSdhJtGjT95njw==