Skip to content

Support React 17 #4165

Closed
Closed

Description

@radekmie

🚀 Feature

Support for React 17. Please note that I'm not requesting a migration, but rather check, whether Docusaurus 2 works with React 17 and if so, update peerDependencies version respectively, most probably to ^17.0.0 || ^16.8.4.

Have you read the Contributing Guidelines on issues?

Yes.

Motivation

None of the breaking changes seem to affect Docusarus in an unexpected way, therefore I guess it should be quick and easy.

My goal is to update uniforms repo to use React 17 and Docusaurus is the last incompatible package.

Activity

  1. added
    feature
    status: needs triage
    on Feb 3, 2021
  2. slorber commented on Feb 4, 2021

    @slorber
    Collaborator

    Yes definitively, but it's not so simple.

    We use react-loadable as a core lib that does not support React 17.

    As the lib is not very maintained, we should likely migrate to loadable-components, or create our own fork of react-loadable (probably the simplest solution).

    Related to #3841

  3. HonkingGoose commented on Feb 4, 2021

    @HonkingGoose
    Contributor

    Also seems related to #3617.

  4. lex111 commented on Feb 11, 2021

    @lex111
    Contributor
  5. radekmie commented on Feb 11, 2021

    @radekmie
    ContributorAuthor

    @lex111 it's because we use Lerna to manage the repo and the website (using Docusaurs) has a playground, that imports the packages. To make it work, we either have to have the same versions everywhere or install non-local (npm) versions of the packages. In this case, we lose the functionality to develop the website using local packages completely.

  6. slorber commented on Feb 12, 2021

    @slorber
    Collaborator

    As for react-loadable, it implicitly supports React 17, doesn't it?

    image

    It accepts any React as a dependency, but this is quite unsafe in practice.

    componentWillMount should have been completely removed in React 17, but it seems the removal has been postponed to React 18, so my assumption was wrong and we are lucky this time! (cf my comment: #4218 (comment))

    I think we can safely upgrade to React 17, but we likely won't be lucky to upgrade to React 18 without removing/fixing react-loadable

  7. linked a pull request that will close this issuefeat(v2): support/use React v17 by default #4218on Feb 12, 2021
  8. radekmie commented on Feb 18, 2021

    @radekmie
    ContributorAuthor

    @slorber: any chance for a release anytime soon?

  9. slorber commented on Feb 18, 2021

    @slorber
    Collaborator

    @radekmie we'll release soon, maybe next week.

    In the meantime the @canary npm dist tag will get you React 17.

    (it's not so risky to use IMHO. If we release it's basically just putting a release tag on an existing canary release)

  10. removed
    status: needs triage
    on Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions