Skip to content
Snippets Groups Projects

Upgrade to React 18

Closed Axel Bocciarelli requested to merge react-18 into main
1 unresolved thread

Following !639 (merged) and as discussed yesterday with @sfisher, I'm opening this MR to upgrade to React 18 and investigate the consequences together a bit more.

  • From the Daiquiri UI side of things, it's looking great, but I will leave it to you guys to test it thoroughly of course.
  • From the Docusaurus side of things, it's looking decent. Docusaurus has only recently released an alpha version to support React 18. I've upgraded to this alpha version and I'm not seeing any major issue, but of course it remains an alpha version, and there are a bunch of peer deps warnings... so not ideal, but maybe not a blocker.
  • From the tests side of things, it's less great... Contrary to my previous attempts, I decided to not upgrade Jest or any of the Testing Library packages. This, in itself, is far from ideal... However, it does have the merit of limiting the number of failing tests. I've skipped the few that do fail for now:
    • those that test hooks, as the @testing-library/react-hooks has been deprecated and replaced with a renderHook function in @testing-library/react – unfortunately, the API is not exactly the same (missing waitForNextUpdate) and requires upgrading @testing-library/react, which breaks most of the other tests;
    • those that use ReactDOM.render and expect no error to be logged (since React throws an error when this legacy API is used).
Edited by Axel Bocciarelli

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
83 83 });
84 84
85 85 beforeEach(() => {
86 jest.spyOn(global.console, 'warn').mockImplementation();
87 jest.spyOn(global.console, 'error').mockImplementation();
  • Axel Bocciarelli requested review from @sfisher

    requested review from @sfisher

  • Stuart Fisher added 68 commits

    added 68 commits

    Compare with previous version

  • Stuart Fisher added 493 commits

    added 493 commits

    Compare with previous version

  • Stuart Fisher mentioned in merge request !798

    mentioned in merge request !798

  • Please register or sign in to reply
    Loading