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 v18 #536

Closed
MLNW opened this issue Apr 21, 2022 · 27 comments
Closed

Support React v18 #536

MLNW opened this issue Apr 21, 2022 · 27 comments
Assignees
Labels
dependencies Pull requests that update a dependency file long-term This issue may be open for a while due to misc holdups/dependencies

Comments

@MLNW
Copy link

MLNW commented Apr 21, 2022

Is your feature request related to a problem? Please describe.

I want to use this package with React v18. When I upgrade my dependencies accordingly, pnpm shows the following peerDependency issues:

├─┬ @material-table/core
│ ├─┬ react-beautiful-dnd
│ │ ├── ✕ unmet peer react@"^16.8.5 || ^17.0.0": found 18.0.0
│ │ ├── ✕ unmet peer react-dom@"^16.8.5 || ^17.0.0": found 18.0.0
│ │ ├─┬ react-redux
│ │ │ └── ✕ unmet peer react@"^16.8.3 || ^17": found 18.0.0
│ │ └─┬ use-memo-one
│ │   └── ✕ unmet peer react@"^16.8.0 || ^17.0.0": found 18.0.0
│ └─┬ @mui/lab
│   └─┬ @mui/x-date-pickers
│     └── ✕ unmet peer react@^17.0.2: found 18.0.0

Describe the solution you'd like
This package should natively support React v18.

Describe alternatives you've considered
Do not upgrade React until its new version is supported.

Additional context

Relevant package versions:

"@emotion/react": "^11.9.0",
"@emotion/styled": "^11.8.1",
"@material-table/core": "^0.2.32",
"@mui/icons-material": "^5.6.2",
"@mui/lab": "^5.0.0-alpha.78",
"@mui/material": "^5.6.2",
"react": "^18.0",
"react-dom": "^18.0",
@Domino987 Domino987 self-assigned this Apr 22, 2022
@Domino987 Domino987 added long-term This issue may be open for a while due to misc holdups/dependencies dependencies Pull requests that update a dependency file labels Apr 22, 2022
@Domino987
Copy link
Contributor

Hi, yes we want to support all versions of react in the future, but as the pnmp print already mentions, we have to wait for the other libs to support it.
And since is not the case yet, we have to wait as well. But ill keep this open to support it ASAP

@MLNW
Copy link
Author

MLNW commented Apr 25, 2022

Regarding the @mui/x-date-pickers: It seems like the date pickers were moved out of the lab with Release v5.6.0. Relevant MR: mui/material-ui#31984

Here is the migration guide: https://mui.com/x/react-date-pickers/migration-lab/

@MLNW
Copy link
Author

MLNW commented Apr 25, 2022

Regarding react-beautiful-dnd: It seems like the package is no longer maintained as seen in the README and this issue regarding React v18 migration atlassian/react-beautiful-dnd#2388. Maybe we need to move on to https://github.com/react-forked/dnd?

@MLNW
Copy link
Author

MLNW commented Apr 25, 2022

Regarding react-redux: The major release v8 about a week ago has introduced React v18 support, see https://github.com/reduxjs/react-redux/releases/tag/v8.0.0.

@Domino987
Copy link
Contributor

Regarding react-redux: The major release v8 about a week ago has introduced React v18 support, see https://github.com/reduxjs/react-redux/releases/tag/v8.0.0.

This is only connected to dnd so we do not need to update it manually.

@Domino987
Copy link
Contributor

Regarding the @mui/x-date-pickers: It seems like the date pickers were moved out of the lab with Release v5.6.0. Relevant MR: mui/material-ui#31984

Here is the migration guide: https://mui.com/x/react-date-pickers/migration-lab/

This is done locally.

@Domino987
Copy link
Contributor

Regarding react-beautiful-dnd: It seems like the package is no longer maintained as seen in the README and this issue regarding React v18 migration atlassian/react-beautiful-dnd#2388. Maybe we need to move on to https://github.com/react-forked/dnd?

I agree, but they do not support 18 yet either.

@MLNW
Copy link
Author

MLNW commented Apr 29, 2022

Regarding react-beautiful-dnd: It seems like the package is no longer maintained as seen in the README and this issue regarding React v18 migration atlassian/react-beautiful-dnd#2388. Maybe we need to move on to https://github.com/react-forked/dnd?

I agree, but they do not support 18 yet either.

Yes that is correct, here is the relevant MR: hello-pangea/dnd#293

@sairam0903
Copy link

Any news or updates on when this is supported for React 18?

@Domino987
Copy link
Contributor

The redux fork is not yet updated

@imnasnainaec
Copy link
Contributor

Regarding react-beautiful-dnd: It seems like the package is no longer maintained as seen in the README and this issue regarding React v18 migration atlassian/react-beautiful-dnd#2388. Maybe we need to move on to https://github.com/react-forked/dnd?

I agree, but they do not support 18 yet either.

Yes that is correct, here is the relevant MR: react-forked/dnd#293

Here's the hold-up as of April: hello-pangea/dnd#336

@mahmoudim
Copy link

I know it doesn't have the same behavior but might be a good idea to migrate to react-dnd

@Xhale1
Copy link
Contributor

Xhale1 commented Aug 15, 2022

@imnasnainaec @MLNW I created a new fork of react-beautiful-dnd which supports React 18 and react strict mode, @hello-pangea/dnd

It should be a drop-in replacement. Just replace every mention of react-beautiful-dnd with @hello-pangea/dnd

@Domino987
Copy link
Contributor

Domino987 commented Aug 15, 2022

I'll try that this week. That's great thank you. I might come back to you if you want to help make the table v18 ready too 😅 or at least show some pitfalls to avoid

@avenger90
Copy link

avenger90 commented Sep 21, 2022

Hi @Domino987 , I am using mui v5, does material-table-core v0.2.35 supports reacts 18 or are we still waiting on dependencies to upgrade?

@Domino987
Copy link
Contributor

Yes, we did a great leap with the dnd update, but we are still missing out on an few.

@Domino987
Copy link
Contributor

Can you guys try the newest next version 0.2.40 for react 18?

@Domino987 Domino987 pinned this issue Oct 3, 2022
@avenger90
Copy link

yes, we will try with react 18 and let you know.

@sucy6330133
Copy link

I have tried the latest next version 0.2.42, the deepmerge-ts issue is still there. Seems more like a webpack issue. Any plan to fix it?

@Domino987
Copy link
Contributor

Domino987 commented Oct 3, 2022

The deep merge work for me. Did you update your npm install and everything?

@sucy6330133
Copy link

Yes, I have fully updated. v0.2.37 is working, just broken after upgrade to 0.2.38. Also tried the latest one. No luck.

@Domino987
Copy link
Contributor

weird. Would you mind throwing your setup into a sandbox? For me to inspect

@sucy6330133
Copy link

sucy6330133 commented Oct 3, 2022

It might related to this issue facebook/create-react-app#12605

@Domino987
Copy link
Contributor

Can you all try the latest version ;)

@imnasnainaec
Copy link
Contributor

imnasnainaec commented Oct 13, 2022

Oh yay, react-beautiful-dnd supports React v18 now: https://github.com/atlassian/react-beautiful-dnd/releases/tag/v13.1.1!

@sucy6330133
Copy link

sucy6330133 commented Oct 16, 2022

Can you all try the latest version ;)

Works fine to me now. Tried version v0.2.48.

@sairam0903
Copy link

Hi @Domino987 can you help with this issue #660

@Domino987 Domino987 unpinned this issue Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file long-term This issue may be open for a while due to misc holdups/dependencies
Projects
None yet
Development

No branches or pull requests

8 participants