GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — [DOM] disable legacy mode behind flag by gnoff · Pull Request #28468 · react/react Conversation
Collaborator
Adds a flag to disable legacy mode. Currently this flag is used to cause legacy mode apis like render and hydrate to throw. This change also removes render, hydrate, unmountComponentAtNode, and unstable_renderSubtreeIntoContainer from the experiemntal entrypoint. Right now for Meta builds this flag is off (legacy mode is still supported). In OSS builds this flag matches NEXT_MAJOR which means it currently is on in experiemental. This means that after merging legacy mode is effectively removed from experimental builds. While this is a breaking change, experimental builds are not stable and users can pin to older versions or update their use of react-dom to no longer use legacy mode APIs.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
gnoff
commented
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most of this diff is updates to tests to disable tests that are exclusively asserting legacy behavior. There are a few instances where the test was not asserting legacy behavior and I just updated the test to not rely upon legacy roots
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
-17
to
-21
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here we remove the apis from experimental entrypoint
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
+268
to
+275
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As an extra precaution this interrupts the hydrate and render APIs. In practice this should be unobservable but if the flag were turned on without a corresponding change in the entrypoints it would at least prevent relying on the functions that can create legacy roots
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Collaborator
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
gnoff
force-pushed
the
flag-legacy-mode
branch
from
a913625 to
789d1cf
Compare
|
There was an error while loading. Please reload this page.
|
Comparing: 034130c...d0e460d Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
789d1cf to
dbdf4ca
Compare
| componentDidMount() { | ||
| expect(function () { | ||
| renderSubtreeIntoContainer(<Parent />, <Component />, portal); | ||
| }).toThrowError('parentComponentmust be a valid React Component'); | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This test has been a noop for 7 years so I removed it. If we want to add a proper test for this warning we need to construct it differently
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // This test should be convertable to createRoot but the allScheduledTypes assertions are no longer the same | ||
| // So I'm leaving it in legacy mode for now and just disabling if legacy mode is turned off | ||
| // @gate !disableLegacyMode |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This was my latest finding regarding the change of scheduler types: #28330 (comment)
Haven't looked deeper into it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…use legacy mode apis like render and hydrate to throw. This change also removes render, hydrate, unmountComponentAtNode, and unstable_renderSubtreeIntoContainer from the experiemntal entrypoint. Right now for Meta builds this flag is off (legacy mode is still supported). In OSS builds this flag matches __NEXT_MAJOR__ which means it currently is on in experiemental. This means that after merging legacy mode is effectively removed from experimental builds. While this is a breaking change, experimental builds are not stable and users can pin to older versions or update their use of react-dom to no longer use legacy mode APIs.
Adds a flag to disable legacy mode. Currently this flag is used to cause legacy mode apis like render and hydrate to throw. This change also removes render, hydrate, unmountComponentAtNode, and unstable_renderSubtreeIntoContainer from the experiemntal entrypoint. Right now for Meta builds this flag is off (legacy mode is still supported). In OSS builds this flag matches __NEXT_MAJOR__ which means it currently is on in experiemental. This means that after merging legacy mode is effectively removed from experimental builds. While this is a breaking change, experimental builds are not stable and users can pin to older versions or update their use of react-dom to no longer use legacy mode APIs. DiffTrain build for [1c02b9d](1c02b9d)
* feat[devtools]: symbolicate source for inspected element ([hoxyq](https://github.com/hoxyq) in [#28471](#28471)) * refactor[devtools]: lazily define source for fiber based on component stacks ([hoxyq](https://github.com/hoxyq) in [#28351](#28351)) * fix[devtools/tree/element]: onClick -> onMouseDown to handle first click correctly ([hoxyq](https://github.com/hoxyq) in [#28486](#28486)) * [DOM] disable legacy mode behind flag ([gnoff](https://github.com/gnoff) in [#28468](#28468)) * Fix Broken Links In Documentation ([justindhillon](https://github.com/justindhillon) in [#28321](#28321)) * Update /link URLs to react.dev ([rickhanlonii](https://github.com/rickhanlonii) in [#28477](#28477)) * [tests] add support for @gate pragma ([gnoff](https://github.com/gnoff) in [#28479](#28479)) * Devtools: Unwrap Promise in useFormState ([eps1lon](https://github.com/eps1lon) in [#28319](#28319)) * Add support for rendering BigInt ([eps1lon](https://github.com/eps1lon) in [#24580](#24580)) * Include server component names in the componentStack in DEV ([sebmarkbage](https://github.com/sebmarkbage) in [#28415](#28415))
- react/react#28596 - react/react#28625 - react/react#28616 - react/react#28491 - react/react#28583 - react/react#28427 - react/react#28613 - react/react#28599 - react/react#28611 - react/react#28610 - react/react#28606 - react/react#28598 - react/react#28549 - react/react#28557 - react/react#28467 - react/react#28591 - react/react#28459 - react/react#28590 - react/react#28564 - react/react#28582 - react/react#28579 - react/react#28578 - react/react#28521 - react/react#28550 - react/react#28576 - react/react#28577 - react/react#28571 - react/react#28572 - react/react#28560 - react/react#28569 - react/react#28573 - react/react#28546 - react/react#28568 - react/react#28562 - react/react#28566 - react/react#28565 - react/react#28559 - react/react#28508 - react/react#20432 - react/react#28555 - react/react#24730 - react/react#28472 - react/react#27991 - react/react#28514 - react/react#28548 - react/react#28526 - react/react#28515 - react/react#28533 - react/react#28532 - react/react#28531 - react/react#28407 - react/react#28522 - react/react#28538 - react/react#28509 - react/react#28534 - react/react#28527 - react/react#28528 - react/react#28519 - react/react#28411 - react/react#28520 - react/react#28518 - react/react#28493 - react/react#28504 - react/react#28499 - react/react#28501 - react/react#28496 - react/react#28471 - react/react#28351 - react/react#28486 - react/react#28490 - react/react#28488 - react/react#28468 - react/react#28321 - react/react#28477 - react/react#28479 - react/react#28480 - react/react#28478 - react/react#28464 - react/react#28475 - react/react#28456 - react/react#28319 - react/react#28345 - react/react#28337 - react/react#28335 - react/react#28466 - react/react#28462 - react/react#28322 - react/react#28444 - react/react#28448 - react/react#28449 - react/react#28446 - react/react#28447 - react/react#24580
Adds a flag to disable legacy mode. Currently this flag is used to cause legacy mode apis like render and hydrate to throw. This change also removes render, hydrate, unmountComponentAtNode, and unstable_renderSubtreeIntoContainer from the experiemntal entrypoint. Right now for Meta builds this flag is off (legacy mode is still supported). In OSS builds this flag matches __NEXT_MAJOR__ which means it currently is on in experiemental. This means that after merging legacy mode is effectively removed from experimental builds. While this is a breaking change, experimental builds are not stable and users can pin to older versions or update their use of react-dom to no longer use legacy mode APIs.
* feat[devtools]: symbolicate source for inspected element ([hoxyq](https://github.com/hoxyq) in [react#28471](react#28471)) * refactor[devtools]: lazily define source for fiber based on component stacks ([hoxyq](https://github.com/hoxyq) in [react#28351](react#28351)) * fix[devtools/tree/element]: onClick -> onMouseDown to handle first click correctly ([hoxyq](https://github.com/hoxyq) in [react#28486](react#28486)) * [DOM] disable legacy mode behind flag ([gnoff](https://github.com/gnoff) in [react#28468](react#28468)) * Fix Broken Links In Documentation ([justindhillon](https://github.com/justindhillon) in [react#28321](react#28321)) * Update /link URLs to react.dev ([rickhanlonii](https://github.com/rickhanlonii) in [react#28477](react#28477)) * [tests] add support for @gate pragma ([gnoff](https://github.com/gnoff) in [react#28479](react#28479)) * Devtools: Unwrap Promise in useFormState ([eps1lon](https://github.com/eps1lon) in [react#28319](react#28319)) * Add support for rendering BigInt ([eps1lon](https://github.com/eps1lon) in [react#24580](react#24580)) * Include server component names in the componentStack in DEV ([sebmarkbage](https://github.com/sebmarkbage) in [react#28415](react#28415))
Adds a flag to disable legacy mode. Currently this flag is used to cause legacy mode apis like render and hydrate to throw. This change also removes render, hydrate, unmountComponentAtNode, and unstable_renderSubtreeIntoContainer from the experiemntal entrypoint. Right now for Meta builds this flag is off (legacy mode is still supported). In OSS builds this flag matches __NEXT_MAJOR__ which means it currently is on in experiemental. This means that after merging legacy mode is effectively removed from experimental builds. While this is a breaking change, experimental builds are not stable and users can pin to older versions or update their use of react-dom to no longer use legacy mode APIs. DiffTrain build for commit 1c02b9d.
* feat[devtools]: symbolicate source for inspected element ([hoxyq](https://github.com/hoxyq) in [#28471](react/react#28471)) * refactor[devtools]: lazily define source for fiber based on component stacks ([hoxyq](https://github.com/hoxyq) in [#28351](react/react#28351)) * fix[devtools/tree/element]: onClick -> onMouseDown to handle first click correctly ([hoxyq](https://github.com/hoxyq) in [#28486](react/react#28486)) * [DOM] disable legacy mode behind flag ([gnoff](https://github.com/gnoff) in [#28468](react/react#28468)) * Fix Broken Links In Documentation ([justindhillon](https://github.com/justindhillon) in [#28321](react/react#28321)) * Update /link URLs to react.dev ([rickhanlonii](https://github.com/rickhanlonii) in [#28477](react/react#28477)) * [tests] add support for @gate pragma ([gnoff](https://github.com/gnoff) in [#28479](react/react#28479)) * Devtools: Unwrap Promise in useFormState ([eps1lon](https://github.com/eps1lon) in [#28319](react/react#28319)) * Add support for rendering BigInt ([eps1lon](https://github.com/eps1lon) in [#24580](react/react#24580)) * Include server component names in the componentStack in DEV ([sebmarkbage](https://github.com/sebmarkbage) in [#28415](react/react#28415)) DiffTrain build for commit react/react@966d174.
Adds a flag to disable legacy mode. Currently this flag is used to cause legacy mode apis like render and hydrate to throw. This change also removes render, hydrate, unmountComponentAtNode, and unstable_renderSubtreeIntoContainer from the experiemntal entrypoint. Right now for Meta builds this flag is off (legacy mode is still supported). In OSS builds this flag matches __NEXT_MAJOR__ which means it currently is on in experiemental. This means that after merging legacy mode is effectively removed from experimental builds. While this is a breaking change, experimental builds are not stable and users can pin to older versions or update their use of react-dom to no longer use legacy mode APIs.
* feat[devtools]: symbolicate source for inspected element ([hoxyq](https://github.com/hoxyq) in [react#28471](react#28471)) * refactor[devtools]: lazily define source for fiber based on component stacks ([hoxyq](https://github.com/hoxyq) in [react#28351](react#28351)) * fix[devtools/tree/element]: onClick -> onMouseDown to handle first click correctly ([hoxyq](https://github.com/hoxyq) in [react#28486](react#28486)) * [DOM] disable legacy mode behind flag ([gnoff](https://github.com/gnoff) in [react#28468](react#28468)) * Fix Broken Links In Documentation ([justindhillon](https://github.com/justindhillon) in [react#28321](react#28321)) * Update /link URLs to react.dev ([rickhanlonii](https://github.com/rickhanlonii) in [react#28477](react#28477)) * [tests] add support for @gate pragma ([gnoff](https://github.com/gnoff) in [react#28479](react#28479)) * Devtools: Unwrap Promise in useFormState ([eps1lon](https://github.com/eps1lon) in [react#28319](react#28319)) * Add support for rendering BigInt ([eps1lon](https://github.com/eps1lon) in [react#24580](react#24580)) * Include server component names in the componentStack in DEV ([sebmarkbage](https://github.com/sebmarkbage) in [react#28415](react#28415))
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.