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 18 support #2199

Open
orangecoding opened this issue Jun 2, 2022 · 20 comments
Open

React 18 support #2199

orangecoding opened this issue Jun 2, 2022 · 20 comments

Comments

@orangecoding
Copy link

react-dates version
latest

Describe the bug
React-Dates is using deprecated functions throughout the whole code base like componentWillReceiveProps. This throws lot's of errors like these.

Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

React-Dates not being updated is probably blocking lot's of folks to upgrade to the latest React version. What is the plan for this?

@ljharb
Copy link
Member

ljharb commented Jun 2, 2022

See #2105, #1748.

@TravnikovDev

This comment was marked as abuse.

@ljharb

This comment was marked as resolved.

@ljharb
Copy link
Member

ljharb commented Oct 15, 2022

It's definitely planned, so this should stay open.

@ljharb ljharb reopened this Oct 15, 2022
@Elegant-Bird
Copy link

Any updates on when this is slated for release?

@ljharb
Copy link
Member

ljharb commented Nov 24, 2022

@Elegant-Bird nope, given that react 17 support isn't even working, merged, or released yet.

Like everywhere on github, always, if there's updates, they'll be posted on the issue.

@suenot

This comment was marked as spam.

aerialist7 added a commit to aerialist7/react-dates that referenced this issue Jul 25, 2023
@aerialist7

This comment was marked as spam.

wtfiwtz added a commit to orchestrated-io/orcs-design-system that referenced this issue Aug 29, 2023
…terday (somehow)

See https://github.com/orchestrated-io/orcs-design-system/security/dependabot/51

To allow the 'overrides' section of package.json you need Node 16.x and NPM > v8.3
React 18.x means that react-dates is no longer compatible. Use --legacy-peer-deps to install. See react-dates/react-dates#2199

'storybook-deployer' is EOL - see https://github.com/storybook-eol/storybook-deployer
abottega pushed a commit to orchestrated-io/orcs-design-system that referenced this issue Aug 29, 2023
* HELP-6391: fix outstanding critical vulnerability that was missed yesterday (somehow)

See https://github.com/orchestrated-io/orcs-design-system/security/dependabot/51

To allow the 'overrides' section of package.json you need Node 16.x and NPM > v8.3
React 18.x means that react-dates is no longer compatible. Use --legacy-peer-deps to install. See react-dates/react-dates#2199

'storybook-deployer' is EOL - see https://github.com/storybook-eol/storybook-deployer

* HELP-6391: migrate to react-number-format 5.x

See https://s-yadav.github.io/react-number-format/docs/migration/
abottega pushed a commit to orchestrated-io/orcs-design-system that referenced this issue Sep 12, 2023
* HELP-6391: fix outstanding critical vulnerability that was missed yesterday (somehow)

See https://github.com/orchestrated-io/orcs-design-system/security/dependabot/51

To allow the 'overrides' section of package.json you need Node 16.x and NPM > v8.3
React 18.x means that react-dates is no longer compatible. Use --legacy-peer-deps to install. See react-dates/react-dates#2199

'storybook-deployer' is EOL - see https://github.com/storybook-eol/storybook-deployer

* HELP-6391: migrate to react-number-format 5.x

See https://s-yadav.github.io/react-number-format/docs/migration/
abottega added a commit to orchestrated-io/orcs-design-system that referenced this issue Sep 12, 2023
* Updates to sidenav component

* Fixed PR comments

* fixed centering of side nav item icons

* fixed some side nav stuff

* sidenav changes

* popover changes

* updated package with version 2.1.33

* updated package lock

* changed ci workflow to include branch

* fixed link styling and layout

* updated version

* fixed sidenav expanded height issue

* publish new version

* pushed one last change before merging to master

* fixed bug with code

* reverted version and branch changes to ci

* forgot packagelock

* Updates to sidenav component (#222)

* Updates to sidenav component

* Fixed PR comments

* Made some updates to sidenav component (#224)

* fixed mobile layout issue

* SideNav + Popover updates (#225)

* fixed two issues with sidenav

* fixed issue with sidenav height

* another fix for sidenav height

* Upgrade to react 18 (#223)

* Upgrade to react 18

* Fix lint errors

* update packages

* Changes to move storybook to version 7.2

* changes to packages

* removed react-dates

* changes to playroom package

* added react dates with --legacy-peer-deps flag

* Playroom update rolled back

* go back to previous versions

* added legacy deps

* add the new packages back

* fix percy tests

* reverted packages

* add percy cli

* percy yaml file added

* change to percy cli

* updated URL for design system which was pointing to old one

* Fixed storybook orcs design theme (#226)

* Update popover aria values based on element visibility [19.2, 19.3, 19.4] (#212)

* fix(popover): update aria values based on element visibility

* fix(popover): update the button font-size

* fix(popover): add aria-described-by using crypto.randomUUID

* fix(popover): replace crypto.randomUUID with React.useId

---------

Co-authored-by: Adam Bottega <adambottega@gmail.com>

* HELP-6391: fix critical vulnerability (#227)

* HELP-6391: fix outstanding vulnerabilities in ORCS (#228)

* HELP-6391: fix outstanding critical vulnerability that was missed yesterday (somehow)

See https://github.com/orchestrated-io/orcs-design-system/security/dependabot/51

To allow the 'overrides' section of package.json you need Node 16.x and NPM > v8.3
React 18.x means that react-dates is no longer compatible. Use --legacy-peer-deps to install. See react-dates/react-dates#2199

'storybook-deployer' is EOL - see https://github.com/storybook-eol/storybook-deployer

* HELP-6391: migrate to react-number-format 5.x

See https://s-yadav.github.io/react-number-format/docs/migration/

* 3.0.2

* fixed some side nav stuff

* Updates to sidenav component

* sidenav changes

* fixed sidenav expanded height issue

---------

Co-authored-by: Karan Mehta <95593651+KaranAtTeamForm@users.noreply.github.com>
Co-authored-by: Jason T <jason@redant.com.au>
Co-authored-by: Nigel Sheridan-Smith <nigel@greenshoresdigital.com>
Co-authored-by: Nigel Sheridan-Smith <nigel@teamform.co>
@eduardoacskimlinks
Copy link

Do you have any update on the support for React 18?

I found even a PR was to upgrade this, but it's closed

@eduardoacskimlinks
Copy link

From what I read across #2105 #1748, it comes across like there needs to be more interest in maintaining up to date the project. Could you confirm if this package is no longer maintained?

In case we need to start the transition to another tool. Thanks in advance

@ljharb
Copy link
Member

ljharb commented Oct 18, 2023

The package remains maintained, but that doesnt mean I’ve had time to work on react 17 and 18 support.

Companies donating employee time and/or funds to cover my own time are what would help with that (something that would have helped as far back as 4-5 years ago, just to illustrate how long there’s been effectively zero help)

@orangecoding
Copy link
Author

Isn't that a lib build and supported by Airbnb?!

@ljharb
Copy link
Member

ljharb commented Oct 28, 2023

@orangecoding airbnb hasn’t contributed anything to react-dates or enzyme in many years.

@aerialist7

This comment was marked as spam.

@phazei

This comment was marked as off-topic.

@ljharb

This comment was marked as resolved.

@eduardoacskimlinks
Copy link

The package remains maintained, but that doesnt mean I've had time to work on react 17 and 18 support.

Companies donating employee time and/or funds to cover my own time are what would help with that (something that would have helped as far back as 4-5 years ago, just to illustrate how long there's been effectively zero help)

Thanks for all your years of effort on this project. It's been instrumental, and I understand your decision. I hope we can help you in the future. While I cannot provide immediate support personally, I will make sure to keep this in mind. You've done a fantastic job with this package for so long.

@corydeppen
Copy link

With the release of React 19 on the horizon, I'm seeing the following after upgrading to React 18.3.1:

Warning: DateRangePickerInput: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

Based on the prior comments about supporting versions 17 and 18, I'm trying to get an idea what the future holds for this project and whether we should be evaluating alternatives if it's possible the latest version of React will not be supported.

@ljharb
Copy link
Member

ljharb commented Apr 27, 2024

@corydeppen once enzyme supports a react version, this project will - which includes react 19.

enzyme remains open for sponsorship and pairing opportunities (going on 7 years now) for any companies that want that support to land faster.

@aerialist7
Copy link

With the release of React 19 on the horizon, I'm seeing the following after upgrading to React 18.3.1:

Warning: DateRangePickerInput: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

Based on the prior comments about supporting versions 17 and 18, I'm trying to get an idea what the future holds for this project and whether we should be evaluating alternatives if it's possible the latest version of React will not be supported.

@corydeppen once enzyme supports a react version, this project will - which includes react 19.

enzyme remains open for sponsorship and pairing opportunities (going on 7 years now) for any companies that want that support to land faster.

@corydeppen, @ljharb if you are interested in support for React 19, then you can try my fork where I supported it and fixed Support for defaultProps will be removed from function components in a future major release warning.

It was released in @aerialist7/react-dates@21.8.0-patch.3
Repo: https://github.com/aerialist7/react-dates

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

No branches or pull requests

9 participants