Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

[React18] Missing children property on ShepherdProps #639

Closed
Guymestef opened this issue May 30, 2022 · 1 comment · Fixed by #637
Closed

[React18] Missing children property on ShepherdProps #639

Guymestef opened this issue May 30, 2022 · 1 comment · Fixed by #637
Labels
bug Something isn't working

Comments

@Guymestef
Copy link

Hello,

The package is not usable with react 18 due to a breaking change (children is not added by default on FC component anymore).
So when upgrading to react 18 we get the following typing error:

Type '{ children: ReactNode; steps: ShepherdOptionsWithType[]; tourOptions: TourOptions; }' is not assignable to type 'IntrinsicAttributes & ShepherdProps'. Property 'children' does not exist on type 'IntrinsicAttributes & ShepherdProps'

@Guymestef
Copy link
Author

As a workaround, I locally overrided the typings:

const ShepherdTourReact18 = ShepherdTour as React.FC<React.ComponentProps<typeof ShepherdTour> & { children?: React.ReactNode }>;

@monshan monshan added the bug Something isn't working label Jul 5, 2022
@monshan monshan closed this as completed Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants