react-complex-tree icon indicating copy to clipboard operation
react-complex-tree copied to clipboard

React 19

Open tonriderapp opened this issue 7 months ago • 1 comments

Hello! This package supported React 19?

tonriderapp avatar Jun 01 '25 15:06 tonriderapp

The code base is currently still on React 18, but afaik there are no incompatibilities with React 19.

lukasbach avatar Jun 03 '25 20:06 lukasbach

We're seeing some type errors now that React 19 is scoping JSX to React.JSX. https://react.dev/blog/2024/04/25/react-19-upgrade-guide#the-jsx-namespace-in-typescript

ERROR in ./node_modules/react-complex-tree/src/types.ts:367:14
TS2503: Cannot find namespace 'JSX'.
    365 |   C extends string = never
    366 | > extends TreeEnvironmentConfiguration<T, C> {
  > 367 |   children?: JSX.Element | (JSX.Element | null)[] | null;
        |              ^^^
    368 | }
    369 |
    370 | export interface UncontrolledTreeEnvironmentProps<

ERROR in ./node_modules/react-complex-tree/src/types.ts:367:29
TS2503: Cannot find namespace 'JSX'.
    365 |   C extends string = never
    366 | > extends TreeEnvironmentConfiguration<T, C> {
  > 367 |   children?: JSX.Element | (JSX.Element | null)[] | null;
        |                             ^^^
    368 | }
    369 |
    370 | export interface UncontrolledTreeEnvironmentProps<

ERROR in ./node_modules/react-complex-tree/src/types.ts:381:13
TS2503: Cannot find namespace 'JSX'.
    379 |   liveDescriptors?: LiveDescriptors;
    380 |   getItemTitle: (item: TreeItem<T>) => string;
  > 381 |   children: JSX.Element | (JSX.Element | null)[] | null;
        |             ^^^
    382 |   disableMultiselect?: boolean;
    383 | }
    384 |

ERROR in ./node_modules/react-complex-tree/src/types.ts:381:28
TS2503: Cannot find namespace 'JSX'.
    379 |   liveDescriptors?: LiveDescriptors;
    380 |   getItemTitle: (item: TreeItem<T>) => string;
  > 381 |   children: JSX.Element | (JSX.Element | null)[] | null;
        |                            ^^^
    382 |   disableMultiselect?: boolean;
    383 | }
    384 |

wdcryer avatar Oct 07 '25 21:10 wdcryer

@wdcryer's PR is merged and deployed, thanks again for the contribution! I'll close this for now, please reopen if issues with React 19 persist.

lukasbach avatar Oct 08 '25 15:10 lukasbach