solidjs-community / solid-transition-group

SolidJS components for applying animations when children elements enter or leave the DOM.
https://solid-transition-group.netlify.app
MIT License
254 stars 14 forks source link

The return type of the <Transition> element doesn't appear to be valid JSX #1

Closed joshuafcole closed 3 years ago

joshuafcole commented 3 years ago
src/Schematic/Schematic.tsx(143,10): error TS2786: 'Transition' cannot be used as a JSX component. 
    Its return type '(() => unknown)[]' is not a valid JSX element. 
        Type '(() => unknown)[]' is not assignable to type 'ArrayElement'.

It looks like ArrayElement doesn't allow FunctionElement children in solid-js/types/rendering/jsx.d.ts. Does it seem reasonable to add that?

ryansolid commented 3 years ago

It should. It probably just doesn't like that it's unknown instead of JSX element being returned. Let me take a look. I've made some updates in recent Solid.

ryansolid commented 3 years ago

Ok I fixed the types in v0.0.2. Let me know it works for you.

joshuafcole commented 3 years ago

Working perfectly, thanks for the crazy fast turnaround time!