bvaughn / react-virtualized

React components for efficiently rendering large lists and tabular data
http://bvaughn.github.io/react-virtualized/
MIT License
26.1k stars 3.05k forks source link

React 18.1.0 not supporting #1778

Closed SojinAntony closed 1 year ago

SojinAntony commented 1 year ago

Feature Request

Package is not working with react versions 18.1.0 and greater

please update peer dependencies to "peerDependencies": { "react": ">=15.3.0", "react-dom": ">=15.3.0" },

yelnyafacee commented 1 year ago

you need npm --legacy-peer-deps

Jephuff commented 1 year ago

It looks like this is fixed on main but just not deployed to npm, any chance we could get a 9.22.4 published? :)

OnkelTem commented 1 year ago

The support for React 18 was added half a year ago, and yet, there is no even an alpha version with this update? @bvaughn, could you please clarify the situation?

evskorobogatij commented 1 year ago

It not working with React 18 When I try install with yarn add @types/react-virtualized@latest I see warnings in logs warning " > react-virtualized@9.22.3" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".

And I installing yarn add @types/react-virtualized@latest --dev

'MultiGrid' cannot be used as a JSX component. Its instance type 'MultiGrid' is not a valid JSX element. The types returned by 'render()' are incompatible between these types. Type 'import("C:/app/booking-front-react/node_modules/@types/react-virtualized/node_modules/@types/react/index").ReactNode' is not assignable to type 'import("C:/app/booking-front-react/node_modules/@types/react-router/node_modules/@types/react/index").ReactNode'.

Why @types/react-virtualized@latest version is 9.21.21?

artsur commented 1 year ago

I have the same problem:

 npm install react-virtualized
npm ERR! code ERESOLVE 
npm ERR! ERESOLVE unable to resolve dependency tree                          
npm ERR!                                                                     
npm ERR! While resolving: test-react-virtualized@0.1.0                       
npm ERR! Found: react@18.2.0                                                 
npm ERR! node_modules/react                                                  
npm ERR!   react@"^18.2.0" from the root project                             
npm ERR!                                                                     
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.3.0 || ^16.0.0-alpha" from react-virtualized@9.22.3
npm ERR! node_modules/react-virtualized
npm ERR!   react-virtualized@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
derwaldgeist commented 1 year ago

It does not work with 17.x either:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: react-virtualized@9.22.3
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!   peer react@">=0.14.0" from @hypnosphi/create-react-context@0.3.1
npm ERR!   node_modules/@hypnosphi/create-react-context
npm ERR!     @hypnosphi/create-react-context@"^0.3.1" from react-popper@1.3.11
npm ERR!     node_modules/react-bootstrap-typeahead/node_modules/react-popper
npm ERR!       react-popper@"^1.0.0" from react-bootstrap-typeahead@4.2.3
npm ERR!       node_modules/react-bootstrap-typeahead
npm ERR!         react-bootstrap-typeahead@"^4.2.3" from the root project
npm ERR!       1 more (react-overlays)
npm ERR!   44 more (@restart/context, @restart/hooks, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.3.0 || ^16.0.0-alpha" from react-virtualized@9.22.3
npm ERR! node_modules/react-virtualized
npm ERR!   react-virtualized@"^9.22.3" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react@16.14.0
npm ERR! node_modules/react
npm ERR!   peer react@"^15.3.0 || ^16.0.0-alpha" from react-virtualized@9.22.3
npm ERR!   node_modules/react-virtualized
npm ERR!     react-virtualized@"^9.22.3" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/tom/.npm/eresolve-report.txt for a full report.
memogarrido commented 1 year ago

1775

bvaughn commented 1 year ago

Version 9.22.4 has been published with peer dependencies updated to include React 17 and 18. (No other changes from 9.22.3)

https://github.com/bvaughn/react-virtualized/releases/tag/v9.22.4