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

React 17 support #5075

Closed
borekb opened this issue Jun 28, 2021 · 2 comments
Closed

React 17 support #5075

borekb opened this issue Jun 28, 2021 · 2 comments
Labels
external This issue is caused by an external dependency and not Docusaurus. proposal This issue is a proposal, usually non-trivial change

Comments

@borekb
Copy link

borekb commented Jun 28, 2021

From our recent attempt to use React 17 in our monorepo which also includes one Docusaurus project (currently on 2.0.0-beta.0 but we also tried 2.0.0-beta.2), these were the notes:


  • @docusaurus/core
    • There're two packages that needs to be resolved using resolutions in package.json: mini-create-react-context and react-side-effect. Both packages have a new x.x.1 version that adds a support for React 17. So far so good.
    • Btw, even the upgrade to Docusaurus version 2.0.0-beta.2 didn't fix the issue.
  • docusaurus-lunr-search
    • There is no official React 17 support right now. The author probably waits for an official Docusaurus v2 release.
  • graphiql

Is supporting React 17 a goal for Docusaurus 2 release?

(I was looking for an issue that tracks React 17 support and couldn't find it so I thought I'd create this one. Hopefully it's useful for people in a situation similar to ours.)

@borekb borekb added status: needs triage This issue has not been triaged by maintainers proposal This issue is a proposal, usually non-trivial change labels Jun 28, 2021
@slorber
Copy link
Collaborator

slorber commented Jun 28, 2021

I'm sorry but we already support React 17, and there's no React 16 in our own monorepo:

image

lease init a new Docusaurus site and check for yourself that all our deps are using/allowing React 17.
If that's not the case (which I doubt) we can re-open, otherwise, it's more likely an issue with your monorepo/package-manager, and you might try to re-generate your lockfile.

docusaurus-lunr-search

We don't provide support for non-official plugins. If you want the plugin to update to React 17, just submit a PR and ask the owner or maintain/publish your own fork.

The author probably waits for an official Docusaurus v2 release.

I believe nobody submitted a React 17 PR yet because nobody cares as much as you do, that's all. Be the first do to that helps the community :)

Plugin authors should definitively not wait for 2.0 GA to move to React 17.

We may have a Docusaurus org someday, and maybe this popular plugin could be in the org so that I can upgrade it more easily myself, as third-party plugins from individual authors tend to not be very well maintained past the initial release excitement (general problem with open-source)

graphiql

We don't depend on graphiql in any way 😅

@slorber slorber closed this as completed Jun 28, 2021
@borekb
Copy link
Author

borekb commented Jun 29, 2021

Sorry, this was a pretty lazy issue by me 😓 🤦‍♂️.

External plugins are of course of out the scope and the "issue" about @docusaurus/core and its dependencies was indeed because our lockfile had locked the older versions of deeper dependencies.

For example, our lockfile:

"mini-create-react-context@npm:^0.4.0":
  version: 0.4.0

Fresh lockfile after npx @docusaurus/init@2.0.0-beta.2 init demo classic:

"mini-create-react-context@npm:^0.4.0":
  version: 0.4.1

In this specific example:

  • mini-create-react-context@0.4.0 peerDepends on "react": "^0.14.0 || ^15.0.0 || ^16.0.0" (src)
  • mini-create-react-context@0.4.1 peerDepends on "react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" (src)

@Josh-Cena Josh-Cena added external This issue is caused by an external dependency and not Docusaurus. and removed status: needs triage This issue has not been triaged by maintainers labels Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external This issue is caused by an external dependency and not Docusaurus. proposal This issue is a proposal, usually non-trivial change
Projects
None yet
Development

No branches or pull requests

3 participants