react-awesome-reveal icon indicating copy to clipboard operation
react-awesome-reveal copied to clipboard

Type issue when using `Slide` in a map/List with children

Open ivanjeremic opened this issue 3 years ago • 1 comments
trafficstars

When I do something like this I get the TypeScript Error.

Type '{ children: Element[]; cascade: true; duration: number; }' is not assignable to type 'IntrinsicAttributes & SlideProps'.
  Property 'children' does not exist on type 'IntrinsicAttributes & SlideProps'.ts(2322)
   <div>
        {data && data.length && (
          <Slide cascade duration={600}>
            {data.map((item) => (
              <div key={item.title}>
                   {item.title}
              </div>
            ))}
          </Slide>
        )}
    </div>

How can it be that Slide is not taking any children that cannot be true because my code works in the browser?

ivanjeremic avatar Jun 01 '22 09:06 ivanjeremic

https://github.com/morellodev/react-awesome-reveal/issues/121#issuecomment-1131895902

morellodev avatar Jun 01 '22 12:06 morellodev