diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 3879b06aeeeed..0000000000000 --- a/.babelrc +++ /dev/null @@ -1,23 +0,0 @@ -{ - "presets": ["react"], - "ignore": ["third_party"], - "plugins": [ - "transform-class-properties", - "syntax-trailing-function-commas", - ["transform-object-rest-spread", { "useBuiltIns": true }], - "transform-es2015-template-literals", - "transform-es2015-literals", - "transform-es2015-arrow-functions", - "transform-es2015-block-scoped-functions", - ["transform-es2015-classes", { "loose": true }], - "transform-es2015-object-super", - "transform-es2015-shorthand-properties", - "transform-es2015-computed-properties", - "transform-es2015-for-of", - "check-es2015-constants", - ["transform-es2015-spread", { "loose": true }], - "transform-es2015-parameters", - ["transform-es2015-destructuring", { "loose": true }], - ["transform-es2015-block-scoping", { "throwIfClosureRequired": true }] - ] -} diff --git a/.circleci/config.yml b/.circleci/config.yml index 4d676f62786b6..584f8c111327e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,6 +22,32 @@ aliases: - &attach_workspace at: build + - &process_artifacts + docker: *docker + environment: *environment + steps: + - checkout + - attach_workspace: *attach_workspace + - *restore_yarn_cache + - *run_yarn + - run: node ./scripts/rollup/consolidateBundleSizes.js + - run: ./scripts/circleci/upload_build.sh + - run: ./scripts/circleci/pack_and_store_artifact.sh + - store_artifacts: + path: ./node_modules.tgz + - store_artifacts: + path: ./build.tgz + - store_artifacts: + path: ./build/bundle-sizes.json + - store_artifacts: + # TODO: Update release script to use local file instead of pulling + # from artifacts. + path: ./scripts/error-codes/codes.json + - persist_to_workspace: + root: build + paths: + - bundle-sizes.json + jobs: setup: docker: *docker @@ -72,19 +98,24 @@ jobs: - checkout - *restore_yarn_cache - *run_yarn - - run: yarn test --maxWorkers=2 + - run: + environment: + RELEASE_CHANNEL: stable + command: yarn test --maxWorkers=2 - test_source_persistent: + test_source_experimental: docker: *docker environment: *environment - steps: - checkout - *restore_yarn_cache - *run_yarn - - run: yarn test-persistent --maxWorkers=2 + - run: + environment: + RELEASE_CHANNEL: experimental + command: yarn test --maxWorkers=2 - test_source_prod: + test_source_persistent: docker: *docker environment: *environment @@ -92,9 +123,12 @@ jobs: - checkout - *restore_yarn_cache - *run_yarn - - run: yarn test-prod --maxWorkers=2 + - run: + environment: + RELEASE_CHANNEL: stable + command: yarn test-persistent --maxWorkers=2 - test_source_fire: + test_source_prod: docker: *docker environment: *environment @@ -102,20 +136,38 @@ jobs: - checkout - *restore_yarn_cache - *run_yarn - - run: yarn test-fire --maxWorkers=2 - - run: yarn test-fire-prod --maxWorkers=2 + - run: + environment: + RELEASE_CHANNEL: stable + command: yarn test-prod --maxWorkers=2 - test_coverage: + build: docker: *docker environment: *environment - + parallelism: 20 steps: - checkout - *restore_yarn_cache - *run_yarn - - run: ./scripts/circleci/test_coverage.sh + - run: + environment: + RELEASE_CHANNEL: stable + command: | + ./scripts/circleci/add_build_info_json.sh + ./scripts/circleci/update_package_versions.sh + yarn build + - run: echo "stable" >> build/RELEASE_CHANNEL + - persist_to_workspace: + root: build + paths: + - RELEASE_CHANNEL + - facebook-www + - node_modules + - react-native + - dist + - sizes/*.json - build: + build_experimental: docker: *docker environment: *environment parallelism: 20 @@ -123,40 +175,76 @@ jobs: - checkout - *restore_yarn_cache - *run_yarn - - run: ./scripts/circleci/add_build_info_json.sh - - run: ./scripts/circleci/update_package_versions.sh - - run: yarn build + - run: + environment: + RELEASE_CHANNEL: experimental + command: | + ./scripts/circleci/add_build_info_json.sh + ./scripts/circleci/update_package_versions.sh + yarn build + - run: echo "experimental" >> build/RELEASE_CHANNEL - persist_to_workspace: root: build paths: + - RELEASE_CHANNEL - facebook-www - node_modules - react-native - dist - sizes/*.json - process_artifacts: + build_devtools_and_process_artifacts: docker: *docker environment: *environment + parallelism: 20 steps: - checkout - attach_workspace: *attach_workspace - *restore_yarn_cache - *run_yarn - - run: node ./scripts/rollup/consolidateBundleSizes.js - - run: node ./scripts/tasks/danger - - run: ./scripts/circleci/upload_build.sh - - run: ./scripts/circleci/pack_and_store_artifact.sh - - store_artifacts: - path: ./node_modules.tgz - - store_artifacts: - path: ./build.tgz - - store_artifacts: - path: ./build/bundle-sizes.json + - run: + environment: + RELEASE_CHANNEL: experimental + command: ./scripts/circleci/pack_and_store_devtools_artifacts.sh - store_artifacts: - # TODO: Update release script to use local file instead of pulling - # from artifacts. - path: ./scripts/error-codes/codes.json + path: ./build/devtools.tgz + + # These jobs are named differently so we can distinguish the stable and + # and experimental artifacts + process_artifacts: *process_artifacts + process_artifacts_experimental: *process_artifacts + + sizebot: + docker: *docker + environment: *environment + steps: + - checkout + - attach_workspace: *attach_workspace + - *restore_yarn_cache + - *run_yarn + # This runs in the process_artifacts job, too, but it's faster to run + # this step in both jobs instead of running the jobs sequentially + - run: node ./scripts/rollup/consolidateBundleSizes.js + - run: + environment: + RELEASE_CHANNEL: stable + command: node ./scripts/tasks/danger + + sizebot_experimental: + docker: *docker + environment: *environment + steps: + - checkout + - attach_workspace: *attach_workspace + - *restore_yarn_cache + - *run_yarn + # This runs in the process_artifacts job, too, but it's faster to run + # this step in both jobs instead of running the jobs sequentially + - run: node ./scripts/rollup/consolidateBundleSizes.js + - run: + environment: + RELEASE_CHANNEL: experimental + command: node ./scripts/tasks/danger lint_build: docker: *docker @@ -177,7 +265,36 @@ jobs: - attach_workspace: *attach_workspace - *restore_yarn_cache - *run_yarn - - run: yarn test-build --maxWorkers=2 + - run: + environment: + RELEASE_CHANNEL: stable + command: yarn test-build --maxWorkers=2 + + test_build_experimental: + docker: *docker + environment: *environment + steps: + - checkout + - attach_workspace: *attach_workspace + - *restore_yarn_cache + - *run_yarn + - run: + environment: + RELEASE_CHANNEL: experimental + command: yarn test-build --maxWorkers=2 + + test_devtools: + docker: *docker + environment: *environment + steps: + - checkout + - attach_workspace: *attach_workspace + - *restore_yarn_cache + - *run_yarn + - run: + environment: + RELEASE_CHANNEL: experimental + command: yarn test-build-devtools --maxWorkers=2 test_dom_fixtures: docker: *docker @@ -188,6 +305,8 @@ jobs: - *restore_yarn_cache - run: name: Run DOM fixture tests + environment: + RELEASE_CHANNEL: stable command: | cd fixtures/dom yarn --frozen-lockfile @@ -204,10 +323,8 @@ jobs: - run: name: Run fuzz tests command: | - FUZZ_TEST_SEED=$RANDOM - echo $FUZZ_TEST_SEED - yarn test fuzz --maxWorkers=2 - yarn test-prod fuzz --maxWorkers=2 + FUZZ_TEST_SEED=$RANDOM yarn test fuzz --maxWorkers=2 + FUZZ_TEST_SEED=$RANDOM yarn test-prod fuzz --maxWorkers=2 test_build_prod: docker: *docker @@ -217,11 +334,27 @@ jobs: - attach_workspace: *attach_workspace - *restore_yarn_cache - *run_yarn - - run: yarn test-build-prod --maxWorkers=2 + - run: + environment: + RELEASE_CHANNEL: stable + command: yarn test-build-prod --maxWorkers=2 + + test_build_prod_experimental: + docker: *docker + environment: *environment + steps: + - checkout + - attach_workspace: *attach_workspace + - *restore_yarn_cache + - *run_yarn + - run: + environment: + RELEASE_CHANNEL: experimental + command: yarn test-build-prod --maxWorkers=2 workflows: version: 2 - commit: + stable: jobs: - setup - lint: @@ -239,15 +372,15 @@ workflows: - test_source_persistent: requires: - setup - - test_source_fire: - requires: - - setup - build: requires: - setup - process_artifacts: requires: - build + - sizebot: + requires: + - build - lint_build: requires: - build @@ -260,9 +393,42 @@ workflows: - test_dom_fixtures: requires: - build - hourly: + + experimental: + jobs: + - setup + - test_source_experimental: + requires: + - setup + - build_experimental: + requires: + - setup + - process_artifacts_experimental: + requires: + - build_experimental + - sizebot_experimental: + requires: + - build_experimental + - test_build_experimental: + requires: + - build_experimental + - test_build_prod_experimental: + requires: + - build_experimental + - lint_build: + requires: + - build_experimental + - test_devtools: + requires: + - build_experimental + - build_devtools_and_process_artifacts: + requires: + - build_experimental + + fuzz_tests: triggers: - schedule: + # Fuzz tests run hourly cron: "0 * * * *" filters: branches: @@ -273,6 +439,3 @@ workflows: - test_fuzz: requires: - setup - - test_coverage: - requires: - - setup diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json new file mode 100644 index 0000000000000..7dd2a59e41457 --- /dev/null +++ b/.codesandbox/ci.json @@ -0,0 +1,10 @@ +{ + "packages": ["packages/react", "packages/react-dom", "packages/scheduler"], + "buildCommand": "build --type=NODE react/index,react-dom/index,scheduler/index,scheduler/tracing", + "publishDirectory": { + "react": "build/node_modules/react", + "react-dom": "build/node_modules/react-dom", + "scheduler": "build/node_modules/scheduler" + }, + "sandboxes": ["new"] +} diff --git a/.eslintignore b/.eslintignore index d95f2bf247e3c..62ca593965173 100644 --- a/.eslintignore +++ b/.eslintignore @@ -12,3 +12,10 @@ scripts/bench/benchmarks/**/*.js # React repository clone scripts/bench/remote-repo/ + +packages/react-devtools-core/dist +packages/react-devtools-extensions/chrome/build +packages/react-devtools-extensions/firefox/build +packages/react-devtools-extensions/shared/build +packages/react-devtools-inline/dist +packages/react-devtools-shell/dist \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 1c48ea5330a3d..74b87ab13a679 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,21 +9,19 @@ const OFF = 0; const ERROR = 2; module.exports = { - extends: 'fbjs', + extends: [ + 'fbjs', + 'prettier' + ], // Stop ESLint from looking for a configuration file in parent folders - 'root': true, + root: true, - plugins: [ - 'jest', - 'no-for-of-loops', - 'react', - 'react-internal', - ], + plugins: ['jest', 'no-for-of-loops', 'react', 'react-internal'], - parser: 'espree', + parser: 'babel-eslint', parserOptions: { - ecmaVersion: 2017, + ecmaVersion: 8, sourceType: 'script', ecmaFeatures: { experimentalObjectRestSpread: true, @@ -35,13 +33,13 @@ module.exports = { rules: { 'accessor-pairs': OFF, 'brace-style': [ERROR, '1tbs'], - 'comma-dangle': [ERROR, 'always-multiline'], 'consistent-return': OFF, 'dot-location': [ERROR, 'property'], - 'dot-notation': ERROR, + // We use console['error']() as a signal to not transform it: + 'dot-notation': [ERROR, {allowPattern: '^(error|warn)$'}], 'eol-last': ERROR, - 'eqeqeq': [ERROR, 'allow-null'], - 'indent': OFF, + eqeqeq: [ERROR, 'allow-null'], + indent: OFF, 'jsx-quotes': [ERROR, 'prefer-double'], 'keyword-spacing': [ERROR, {after: true, before: true}], 'no-bitwise': OFF, @@ -51,9 +49,9 @@ module.exports = { 'no-shadow': ERROR, 'no-unused-expressions': ERROR, 'no-unused-vars': [ERROR, {args: 'none'}], - 'no-use-before-define': [ERROR, {functions: false, variables: false}], + 'no-use-before-define': OFF, 'no-useless-concat': OFF, - 'quotes': [ERROR, 'single', {avoidEscape: true, allowTemplateLiterals: true }], + quotes: [ERROR, 'single', {avoidEscape: true, allowTemplateLiterals: true}], 'space-before-blocks': ERROR, 'space-before-function-paren': OFF, 'valid-typeof': [ERROR, {requireStringLiterals: true}], @@ -65,6 +63,12 @@ module.exports = { 'no-var': ERROR, strict: ERROR, + // Enforced by Prettier + // TODO: Prettier doesn't handle long strings or long comments. Not a big + // deal. But I turned it off because loading the plugin causes some obscure + // syntax error and it didn't seem worth investigating. + 'max-len': OFF, + // React & JSX // Our transforms set this automatically 'react/jsx-boolean-value': [ERROR, 'always'], @@ -78,7 +82,10 @@ module.exports = { 'react/react-in-jsx-scope': ERROR, 'react/self-closing-comp': ERROR, // We don't care to do this - 'react/jsx-wrap-multilines': [ERROR, {declaration: false, assignment: false}], + 'react/jsx-wrap-multilines': [ + ERROR, + {declaration: false, assignment: false}, + ], // Prevent for...of loops because they require a Symbol polyfill. // You can disable this rule for code that isn't shipped (e.g. build scripts and tests). @@ -88,7 +95,9 @@ module.exports = { // the second argument of warning/invariant should be a literal string 'react-internal/no-primitive-constructors': ERROR, 'react-internal/no-to-warn-dev-within-to-throw': ERROR, - 'react-internal/warning-and-invariant-args': ERROR, + 'react-internal/invariant-args': ERROR, + 'react-internal/warning-args': ERROR, + 'react-internal/no-production-logging': ERROR, }, overrides: [ @@ -112,6 +121,7 @@ module.exports = { files: esNextPaths, parser: 'babel-eslint', parserOptions: { + ecmaVersion: 8, sourceType: 'module', }, rules: { @@ -124,21 +134,40 @@ module.exports = { rules: { // https://github.com/jest-community/eslint-plugin-jest 'jest/no-focused-tests': ERROR, - } + 'jest/valid-expect': ERROR, + 'jest/valid-expect-in-promise': ERROR, + }, + }, + { + files: [ + '**/__tests__/**/*.js', + 'scripts/**/*.js', + 'packages/*/npm/**/*.js', + 'packages/dom-event-testing-library/**/*.js', + 'packages/react-devtools*/**/*.js' + ], + rules: { + 'react-internal/no-production-logging': OFF, + 'react-internal/warning-args': OFF, + }, }, { files: ['packages/react-native-renderer/**/*.js'], globals: { nativeFabricUIManager: true, - } - } + }, + }, ], globals: { + SharedArrayBuffer: true, + spyOnDev: true, spyOnDevAndProd: true, spyOnProd: true, __PROFILE__: true, __UMD__: true, + __EXPERIMENTAL__: true, + trustedTypes: true, }, }; diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index f2f6a21e173ff..e19ec2cb10b16 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,14 +1,4 @@ - +👉 Please follow one of these issue templates: +- https://github.com/facebook/react/issues/new/choose -**Do you want to request a *feature* or report a *bug*?** - -**What is the current behavior?** - -**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:** - -**What is the expected behavior?** - -**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** +Note: to keep the backlog clean and actionable, issues may be immediately closed if they do not follow one of the above issue templates. diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000000000..e561f9d26154a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,41 @@ +--- +name: "🐛 Bug Report" +about: Report a reproducible bug or regression. +title: 'Bug: ' +labels: 'Status: Unconfirmed' + +--- + + + +React version: + +## Steps To Reproduce + +1. +2. + + + +Link to code example: + + + +## The current behavior + + +## The expected behavior diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md new file mode 100644 index 0000000000000..57c380e2ac97a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.md @@ -0,0 +1,13 @@ +--- +name: "📃 Documentation Issue" +about: This issue tracker is not for documentation issues. Please file documentation issues at https://github.com/reactjs/reactjs.org. +title: 'Docs: ' +labels: 'Resolution: Invalid' + +--- + +🚨 This issue tracker is not for documentation issues. 🚨 + +The React website is hosted on a separate repository. You may let the +team know about any issues with the documentation by opening an issue there: +- https://github.com/reactjs/reactjs.org/issues/new diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 0000000000000..0131925d2c7a3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,29 @@ +--- +name: "🤔 Questions and Help" +about: This issue tracker is not for questions. Please ask questions at https://stackoverflow.com/questions/tagged/react. +title: 'Question: ' +labels: 'Resolution: Invalid, Type: Question' + +--- + +🚨 This issue tracker is not for questions. 🚨 + +As it happens, support requests that are created as issues are likely to be closed. We want to make sure you are able to find the help you seek. Please take a look at the following resources. + +## Coding Questions + +If you have a coding question related to React and React DOM, it might be better suited for Stack Overflow. It's a great place to browse through frequent questions about using React, as well as ask for help with specific questions. + +https://stackoverflow.com/questions/tagged/react + +## Talk to other React developers + +There are many online forums which are a great place for discussion about best practices and application architecture as well as the future of React. + +https://reactjs.org/community/support.html#popular-discussion-forums + +## Proposals + +If you'd like to discuss topics related to the future of React, or would like to propose a new feature or change before sending a pull request, please check out the discussions and proposals repository. + +https://github.com/reactjs/rfcs diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b8a0139bd96c1..a82527b0aa18d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,14 +1,27 @@ -**Before submitting a pull request,** please make sure the following is done: - -1. Fork [the repository](https://github.com/facebook/react) and create your branch from `master`. -2. Run `yarn` in the repository root. -3. If you've fixed a bug or added code that should be tested, add tests! -4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. -5. Run `yarn test-prod` to test in the production environment. It supports the same options as `yarn test`. -6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect". -7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). -8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. -9. Run the [Flow](https://flowtype.org/) typechecks (`yarn flow`). -10. If you haven't already, complete the CLA. - -**Learn more about contributing:** https://reactjs.org/docs/how-to-contribute.html + + +## Summary + + + +## Test Plan + + diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000000000..6dc44693e3ece --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,31 @@ +# Configuration for probot-stale - https://github.com/probot/stale +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 90 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - "Partner" + - "React Core Team" + - "Resolution: Backlog" + - "Type: Bug" + - "Type: Discussion" + - "Type: Regression" +# Label to use when marking an issue as stale +staleLabel: "Resolution: Stale" +issues: + # Comment to post when marking an issue as stale. + markComment: > + This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. + Thank you for your contribution. + # Comment to post when closing a stale issue. + closeComment: > + Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! +pulls: + # Comment to post when marking a pull request as stale. + markComment: > + This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. + Thank you for your contribution. + # Comment to post when closing a stale pull request. + closeComment: > + Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you! diff --git a/.gitignore b/.gitignore index 53de0c289077e..902e6c9c8838b 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,14 @@ chrome-user-data .vscode *.swp *.swo + +packages/react-devtools-core/dist +packages/react-devtools-extensions/chrome/build +packages/react-devtools-extensions/chrome/*.crx +packages/react-devtools-extensions/chrome/*.pem +packages/react-devtools-extensions/firefox/build +packages/react-devtools-extensions/firefox/*.xpi +packages/react-devtools-extensions/firefox/*.pem +packages/react-devtools-extensions/shared/build +packages/react-devtools-inline/dist +packages/react-devtools-shell/dist \ No newline at end of file diff --git a/.mailmap b/.mailmap index 278784e0afa9b..86c96fe683ed6 100644 --- a/.mailmap +++ b/.mailmap @@ -88,6 +88,7 @@ Kevin Coughlin Krystian Karczewski Kunal Mehta Laurence Rowe +Lea Rosema Marcin K. Mark Anderson Mark Funk diff --git a/.nvmrc b/.nvmrc index 33edba2d01f06..70047db82e050 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v8.4.0 +v10.16.3 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000000000..bea24210eca5e --- /dev/null +++ b/.prettierignore @@ -0,0 +1,6 @@ +packages/react-devtools-core/dist +packages/react-devtools-extensions/chrome/build +packages/react-devtools-extensions/firefox/build +packages/react-devtools-extensions/shared/build +packages/react-devtools-inline/dist +packages/react-devtools-shell/dist \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js index df8d863ae4c09..6e5dcb710f0f0 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -8,7 +8,7 @@ module.exports = { jsxBracketSameLine: true, trailingComma: 'es5', printWidth: 80, - parser: 'babylon', + parser: 'babel', overrides: [ { diff --git a/.watchmanconfig b/.watchmanconfig index e69de29bb2d1d..0967ef424bce6 100644 --- a/.watchmanconfig +++ b/.watchmanconfig @@ -0,0 +1 @@ +{} diff --git a/CHANGELOG.md b/CHANGELOG.md index 744cfa24e57bf..e8eb19c9d8927 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,95 @@ +## 16.12.0 (November 14, 2019) + +### React DOM + +* Fix passive effects (`useEffect`) not being fired in a multi-root app. ([@acdlite](https://github.com/acdlite) in [#17347](https://github.com/facebook/react/pull/17347)) + +### React Is + +* Fix `lazy` and `memo` types considered elements instead of components ([@bvaughn](https://github.com/bvaughn) in [#17278](https://github.com/facebook/react/pull/17278)) + +## 16.11.0 (October 22, 2019) + +### React DOM + +* Fix `mouseenter` handlers from firing twice inside nested React containers. [@yuanoook](https://github.com/yuanoook) in [#16928](https://github.com/facebook/react/pull/16928) +* Remove `unstable_createRoot` and `unstable_createSyncRoot` experimental APIs. (These are available in the Experimental channel as `createRoot` and `createSyncRoot`.) ([@acdlite](http://github.com/acdlite) in [#17088](https://github.com/facebook/react/pull/17088)) + +## 16.10.2 (October 3, 2019) + +### React DOM + +* Fix regression in react-native-web by restoring order of arguments in event plugin extractors ([@necolas](https://github.com/necolas) in [#16978](https://github.com/facebook/react/pull/16978)) + +## 16.10.1 (September 28, 2019) + +### React DOM + +* Fix regression in Next.js apps by allowing Suspense mismatch during hydration to silently proceed ([@sebmarkbage](https://github.com/sebmarkbage) in [#16943](https://github.com/facebook/react/pull/16943)) + +## 16.10.0 (September 27, 2019) + +### React DOM + +* Fix edge case where a hook update wasn't being memoized. ([@sebmarkbage](http://github.com/sebmarkbage) in [#16359](https://github.com/facebook/react/pull/16359)) +* Fix heuristic for determining when to hydrate, so we don't incorrectly hydrate during an update. ([@sebmarkbage](http://github.com/sebmarkbage) in [#16739](https://github.com/facebook/react/pull/16739)) +* Clear additional fiber fields during unmount to save memory. ([@trueadm](http://github.com/trueadm) in [#16807](https://github.com/facebook/react/pull/16807)) +* Fix bug with required text fields in Firefox. ([@halvves](http://github.com/halvves) in [#16578](https://github.com/facebook/react/pull/16578)) +* Prefer `Object.is` instead of inline polyfill, when available. ([@ku8ar](http://github.com/ku8ar) in [#16212](https://github.com/facebook/react/pull/16212)) +* Fix bug when mixing Suspense and error handling. ([@acdlite](http://github.com/acdlite) in [#16801](https://github.com/facebook/react/pull/16801)) + + +### Scheduler (Experimental) + +* Improve queue performance by switching its internal data structure to a min binary heap. ([@acdlite](http://github.com/acdlite) in [#16245](https://github.com/facebook/react/pull/16245)) +* Use `postMessage` loop with short intervals instead of attempting to align to frame boundaries with `requestAnimationFrame`. ([@acdlite](http://github.com/acdlite) in [#16214](https://github.com/facebook/react/pull/16214)) + +### useSubscription + +* Avoid tearing issue when a mutation happens and the previous update is still in progress. ([@bvaughn](http://github.com/bvaughn) in [#16623](https://github.com/facebook/react/pull/16623)) + +## 16.9.0 (August 8, 2019) + +### React + +* Add `` API for gathering performance measurements programmatically. ([@bvaughn](https://github.com/bvaughn) in [#15172](https://github.com/facebook/react/pull/15172)) +* Remove `unstable_ConcurrentMode` in favor of `unstable_createRoot`. ([@acdlite](https://github.com/acdlite) in [#15532](https://github.com/facebook/react/pull/15532)) + +### React DOM + +* Deprecate old names for the `UNSAFE_*` lifecycle methods. ([@bvaughn](https://github.com/bvaughn) in [#15186](https://github.com/facebook/react/pull/15186) and [@threepointone](https://github.com/threepointone) in [#16103](https://github.com/facebook/react/pull/16103)) +* Deprecate `javascript:` URLs as a common attack surface. ([@sebmarkbage](https://github.com/sebmarkbage) in [#15047](https://github.com/facebook/react/pull/15047)) +* Deprecate uncommon "module pattern" (factory) components. ([@sebmarkbage](https://github.com/sebmarkbage) in [#15145](https://github.com/facebook/react/pull/15145)) +* Add support for the `disablePictureInPicture` attribute on `