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

Support React 17 #4165

Closed
radekmie opened this issue Feb 3, 2021 · 7 comments · Fixed by #4218
Closed

Support React 17 #4165

radekmie opened this issue Feb 3, 2021 · 7 comments · Fixed by #4218
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.

Comments

@radekmie
Copy link
Contributor

radekmie commented Feb 3, 2021

🚀 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.

@radekmie radekmie added feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: needs triage This issue has not been triaged by maintainers labels Feb 3, 2021
@slorber
Copy link
Collaborator

slorber commented Feb 4, 2021

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

@HonkingGoose
Copy link
Contributor

Also seems related to #3617.

@lex111
Copy link
Contributor

lex111 commented Feb 11, 2021

I don’t really understand how this issues is related to Docusaurus in your case, because your site is not place in separate package?

https://github.com/vazco/uniforms/blob/ec5030886f0af285657583e58654b29ef280c153/packages/uniforms/package.json#L27-L29

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

https://github.com/jamiebuilds/react-loadable/blob/6201c5837b212d6244c57f3748f2b1375096beeb/package.json#L45-L47

@radekmie
Copy link
Contributor Author

@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.

@slorber
Copy link
Collaborator

slorber commented Feb 12, 2021

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

@slorber slorber linked a pull request Feb 12, 2021 that will close this issue
@radekmie
Copy link
Contributor Author

@slorber: any chance for a release anytime soon?

@slorber
Copy link
Collaborator

slorber commented Feb 18, 2021

@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)

@Josh-Cena Josh-Cena removed the status: needs triage This issue has not been triaged by maintainers label Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants