baseweb icon indicating copy to clipboard operation
baseweb copied to clipboard

Replace react-virtualized with react-virtual

Open sshquack opened this issue 3 years ago • 1 comments

Current Behavior

  1. React-virtualized is used by baseui
❯ npm why react-virtualized
[email protected]
node_modules/baseui/node_modules/react-virtualized
  react-virtualized@"^9.21.1" from [email protected]
  node_modules/baseui
    baseui@"^11.0.0" from the root project
  1. React-virtualized is EOL and unmaintained with hundreds of open bugs. See comment by author.
Screenshot 000163@2x
  1. Lots of warnings with npm install. I'm aware of legacy-peer-deps but that that's a band-aid fix not a permanent fix. Doesn't support react 18
❯ npm i
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^17.0.2" from the root project
npm WARN   39 more (baseui, little-state-machine, prop-types-extra, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^15.3.0 || ^16.0.0-alpha" from [email protected]
npm WARN node_modules/baseui/node_modules/react-virtualized
npm WARN   react-virtualized@"^9.21.1" from [email protected]
npm WARN   node_modules/baseui
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^15.3.0 || ^16.0.0-alpha" from [email protected]
npm WARN   node_modules/baseui/node_modules/react-virtualized
npm WARN     react-virtualized@"^9.21.1" from [email protected]
npm WARN     node_modules/baseui
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react-dom
npm WARN   react-dom@"^17.0.2" from the root project
npm WARN   12 more (baseui, react-input-mask, react-movable, react-range, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^15.3.0 || ^16.0.0-alpha" from [email protected]
npm WARN node_modules/baseui/node_modules/react-virtualized
npm WARN   react-virtualized@"^9.21.1" from [email protected]
npm WARN   node_modules/baseui
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"^15.3.0 || ^16.0.0-alpha" from [email protected]
npm WARN   node_modules/baseui/node_modules/react-virtualized
npm WARN     react-virtualized@"^9.21.1" from [email protected]
npm WARN     node_modules/baseui
  1. Maintenance scores are going low https://socket.dev/npm/package/react-virtualized

Expected Behavior

No errors warnings when installing baseui

  • Replace the EOL react-virtualized with Tanstack's react-virtual.
  • It already supports react 18
  • It has over 500k monthly downloads on npm
  • Actively maintained with less than 12 open bugs

Your Environment

❯ npm --version
8.6.0
                                                                                                                                                                 
❯ node --version
v16.13.2
Tech Version
Base UI v11.0.0
React v17.0.2
browser Chrome
  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

sshquack avatar Apr 11 '22 02:04 sshquack

This is functionally a prerequisite for https://github.com/uber/baseweb/issues/4900 as well, since react-virtualized will likely never update past React v16.

bsplosion avatar May 27 '22 14:05 bsplosion