Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[major] upgrade to React 18 #1875

Merged
merged 15 commits into from
Jul 13, 2022
Merged

[major] upgrade to React 18 #1875

merged 15 commits into from
Jul 13, 2022

Conversation

coston
Copy link
Contributor

@coston coston commented Apr 12, 2022

Description

The React 18 Release Candidate is available, and React 18 will enable several enhancements when it comes to module federation. This branch is a proving ground of what is required to upgrade what React is released and surface any issues with breaking changes.

Todo

  • Upgrade dependencies of packages and samples to React 18
  • Upgrade render methods to createRoot and hydrateRoot
  • Refactor server methods to React 18 Conventions

Known issues from the upgrade

  • ⛔️ Critical: renderToStaticNodeStream adds trailing comment nodes to any text node, breaking render, tests fail
  • ⛔️ CSR innerHtml is broken when using createRoot, tests fail
  • Updates/Deprecations to React 18 Server Rendering APIs call for thoughtful refactor of subapp-react's framework-lib
  • renderToNodeStream will work in 18, including the new Suspense features described below, but it will buffer the entire content until the end of the stream. In other words, it will no longer do streaming.

@coston coston changed the title feat: upgrade to react 18, document issues feat(: upgrade to react 18 Apr 12, 2022
@coston coston changed the title feat(: upgrade to react 18 feat: upgrade to react 18 Apr 12, 2022
@coston coston changed the title feat: upgrade to react 18 !feat: upgrade to react 18 Apr 12, 2022
@coston coston changed the title !feat: upgrade to react 18 !feat: upgrade to React 18 Apr 12, 2022
mristic505 and others added 14 commits April 19, 2022 11:20
#1876)

* test: resolve CEECORE-2971

* feat(CEECORE-2971): upgrade to React v18

* test(CEECORE-2971): remove comments from fe-frameworkLib CSR test

Co-authored-by: Mateja Ristic <matejaristic@MatejaR-USMAC22.local>
…workLib and update test (#1883)

* test: resolve CEECORE-2971

* feat(CEECORE-2971): upgrade to React v18

* test(CEECORE-2971): remove comments from fe-frameworkLib CSR test

* test(CEECORE-2980): refactor test to work with renderToPipeableNodeStream

* refactor(CEECORE-2932): replace depricated render methods and unnecessary dependecies in frameworkLib

* test(CEECORE-2932): update ssr-framework test to work with renderToPipeableNodeStream

* test(CEECORE-2932): remove react-async-ssr references from ssr-framework test

* docs: remove react-async-ssr reference from README

* docs: remove react-async-ssr reference from README

* refactor: remove react-async-ssr from package.json files

* refactor: remove react-async-ssr from package.json files

* fix: run getTestWritable() within tests and define as an arrow function

* remove renderToStaticMarkup and refactor test in subapp-react

Co-authored-by: Mateja Ristic <matejaristic@MatejaR-USMAC22.local>
Co-authored-by: Mateja Ristic <matejaristic@MatejaR-USMAC22.lan>
* test(CEECORE-2980): refactor test to work with renderToPipeableNodeStream

* test(CEECORE-2932): update ssr-framework test to work with renderToPipeableNodeStream

* fix: run getTestWritable() within tests and define as an arrow function

* Remove redundant getTestWritable defintion

* remove redundant Stream import

* feat(CEECORE-2971): upgrade to React v18

* test(CEECORE-2980): refactor test to work with renderToPipeableNodeStream

* refactor(CEECORE-2932): replace depricated render methods and unnecessary dependecies in frameworkLib

* test(CEECORE-2932): update ssr-framework test to work with renderToPipeableNodeStream

* remove getTestWritable

* remove test subapp

* major: upgrade react-router in xarc-react-router package to v6

* update remaining dependencies in xarc-react-router

* upgrade dependencies

* remove redundant Strema import

Co-authored-by: Mateja Ristic <matejaristic@MatejaR-USMAC22.local>
#1886)

* feat(CEECORE-2971): upgrade to React v18

* test(CEECORE-2980): refactor test to work with renderToPipeableNodeStream

* refactor(CEECORE-2932): replace depricated render methods and unnecessary dependecies in frameworkLib

* test(CEECORE-2932): update ssr-framework test to work with renderToPipeableNodeStream

* fix: run getTestWritable() within tests and define as an arrow function

* undo test file changes

* update subapp2-basic folders

* upgrade xarc-react-router dependencies

* test(CEECORE-2980): refactor test to work with renderToPipeableNodeStream

* test(CEECORE-2932): update ssr-framework test to work with renderToPipeableNodeStream

* fix: run getTestWritable() within tests and define as an arrow function

* Remove redundant getTestWritable defintion

* remove redundant Stream import

* feat(CEECORE-2971): upgrade to React v18

* test(CEECORE-2980): refactor test to work with renderToPipeableNodeStream

* refactor(CEECORE-2932): replace depricated render methods and unnecessary dependecies in frameworkLib

* test(CEECORE-2932): update ssr-framework test to work with renderToPipeableNodeStream

* remove getTestWritable

* remove test subapp

* major: upgrade react-router in xarc-react-router package to v6

* update remaining dependencies in xarc-react-router

* upgrade dependencies

* remove redundant Strema import

* add react-router v6 support

* add title

* refactor routes file

* refactor routes file

* update package.json files for xarc-react-router and subapp2

Co-authored-by: Mateja Ristic <matejaristic@MatejaR-USMAC22.local>
…bleStream method for SSR (#1884)

* feat(CEECORE-2971): upgrade to React v18

* test(CEECORE-2980): refactor test to work with renderToPipeableNodeStream

* test(CEECORE-2932): update ssr-framework test to work with renderToPipeableNodeStream

* fix: run getTestWritable() within tests and define as an arrow function

* remove renderToStaticMarkup and refactor test in subapp-react

* replace renderToNodeStream with renderToPipeableStream, adjust tests

* remove dangling commas and trailing empty spaces

* remove redundant sample app

* remove redundant formatting changes

* remove redundant formatting changes in redux-router-engine test

Co-authored-by: Mateja Ristic <matejaristic@MatejaR-USMAC22.local>
Co-authored-by: Mateja Ristic <matejaristic@MatejaR-USMAC22.lan>
)

* test(CEECORE-2980): refactor test to work with renderToPipeableNodeStream

* test(CEECORE-2932): update ssr-framework test to work with renderToPipeableNodeStream

* fix: run getTestWritable() within tests and define as an arrow function

* Remove redundant getTestWritable defintion

* remove redundant Stream import

* feat(CEECORE-2971): upgrade to React v18

* test(CEECORE-2980): refactor test to work with renderToPipeableNodeStream

* refactor(CEECORE-2932): replace depricated render methods and unnecessary dependecies in frameworkLib

* test(CEECORE-2932): update ssr-framework test to work with renderToPipeableNodeStream

* remove getTestWritable

* remove test subapp

* WIP: change renderToPipeableStream implementation

* remove formatting changes

* cleanup

* refactor frameworkLib tests for new render method implementation

* remove redundtant hydration tests and add comments

Co-authored-by: Mateja Ristic <matejaristic@MatejaR-USMAC22.local>
* upgrade and refactor react-subapp to react-router v6

* remove extra empty comment from test expectations
* add subapp-v1 with react 18 suspense feature

* add new suspense and transition features

* add comments to suspense demo

* upgrade subapp V1 packages

* refactor framework-lib to workl with react router v6

* refactor subapp1-online-store to work with react router 6

* upgrade and refactor react-subapp to react-router v6

* add FEATURES section to README

* add BrowserRouter to the subapp

* remove extra empty comment from test expectations

* remove test folder
* minor: upgrade to react 18.2.0

* minor: upgrade react 18.1.0 to 10.2.0

* upgrade remaining react version to 18.2.0
* fix: fix error with ts 4.7.2 version

* fix: fix test cases and lint issues

* patch: add eslint-plugin-tsdoc as dev dependency

* Removed duplicate 'fetch' variable as it is already defined as a built-in global variable

* fix: fix error with ts 4.7.2 version

* fix: fix lint issues

* revert changes in xarc-react-query test

* (fix)CEECORE-3183: fix failing test cases (#1893)

* fix: fixed lint issue related to react component

* fix: failed tests and checks in subapp-react (#1894)

* (fix)CEECORE-3183: fix failing test cases

* fix failed checks from subapp-react

* fix:remove redundant props (#1895)

Co-authored-by: Srinath Muthyala <Srinath.reddy.muthyala@walmart.com>
Co-authored-by: mristic505 <mateja.ristic@gmail.com>
Co-authored-by: Srinath Muthyala <Srinath.reddy.muthyala@walmart.com>
Co-authored-by: Srinath Muthyala <Srinath.reddy.muthyala@walmart.com>
@smuthya smuthya changed the title !feat: upgrade to React 18 [major] upgrade to React 18 Jul 13, 2022
@smuthya smuthya marked this pull request as ready for review July 13, 2022 19:23
@smuthya smuthya merged commit c226869 into master Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants