nikitaeverywhere / react-xmasonry

Simple, minimalistic and featured native masonry layout for React JS.
https://zitros.github.io/react-xmasonry
MIT License
90 stars 12 forks source link

`children` prop type for latest react #25

Closed iofjuupasli closed 2 years ago

iofjuupasli commented 2 years ago

With React v18.2.0 I have error in TypeScript:

TS2322: Type '{ children: (false | Element | Element[] | (Element | null)[] | undefined)[]; targetBlockWidth: number; center: false; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<XMasonryProps, {}, any>> & Readonly<XMasonryProps>'.   Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<XMasonryProps, {}, any>> & Readonly<XMasonryProps>'.

As I understand it means that in https://github.com/ZitRos/react-xmasonry/blob/master/types.d.ts it should have children property.

nikitaeverywhere commented 2 years ago

Hi! Thanks for your report.

Feel free to contribute — I’ll review any PRs made. Thanks!

On Wed, 3 Aug 2022 at 17:16, Valery @.***> wrote:

With React v18.2.0 I have error in TypeScript:

TS2322: Type '{ children: (false | Element | Element[] | (Element | null)[] | undefined)[]; targetBlockWidth: number; center: false; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<XMasonryProps, {}, any>> & Readonly'. Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<XMasonryProps, {}, any>> & Readonly'.

As I understand it means that in https://github.com/ZitRos/react-xmasonry/blob/master/types.d.ts it should have children property.

— Reply to this email directly, view it on GitHub https://github.com/ZitRos/react-xmasonry/issues/25, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGCCSH24RJQMDZJTKSLRBDVXJBGJANCNFSM55OIT25A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Nikita https://zitros.tk