lukasbach / react-complex-tree

Unopinionated Accessible Tree Component with Multi-Select and Drag-And-Drop
https://rct.lukasbach.com
MIT License
952 stars 77 forks source link

Issues with React v 18 #194

Open dotnotguy opened 1 year ago

dotnotguy commented 1 year ago

Tried to install this on a React v18 project and it doesn't work. Is there an updated version of this? I'm looking for a TreeView nav for my app that will get the data from an WebAPI in JSON format and liked how this looked, but can't get it working

lukasbach commented 1 year ago

Hi,

RCT is already updated to react 18. Can you share details about the error you're getting?

dotnotguy commented 1 year ago

It wouldn't install to I had t to use the --force parameter, then got a conflicting react version when running my app with it on a component.

lukasbach commented 1 year ago

This is hard to look into without more details since there could be many other libraries whose transitive dependencies might cause the conflict. Can you share the error log that caused the conflict issue and the lock file (yarn.lock or npm lock file)?

dotnotguy commented 1 year ago

This morning, the install worked, however, I get a few errors when trying to run one of the examples: error reads: [ when running f12] 'cannot read properties of null value (reading 'useState') at 'uncontrolledTreeEnironment.js:70:1

there are several more

I downloaded the example data.js file and that kicks out some errors as well. I'm using React with .JS not .TS extensions. Not sure if that makes a difference or not. The data.js file kicks out an error such as 'token expected' on line 9 (value as object) : undefined,