Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 18 incompatible? #41

Open
hundehausen opened this issue Sep 23, 2022 · 3 comments
Open

React 18 incompatible? #41

hundehausen opened this issue Sep 23, 2022 · 3 comments

Comments

@hundehausen
Copy link

hundehausen commented Sep 23, 2022

I get the error
Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ICalLink> & Pick<Readonly<Props>, never> & InexactPartial<...> & InexactPartial<...>'.

is it because of this?

@longgtruong
Copy link

same here

@Knighton910
Copy link

Any solution?

@AntoLC
Copy link

AntoLC commented Jun 9, 2023

You can update the interface to make it work:

  • Create the file: src/types/react-icalendar-link/index.d.ts and type:
import { PropsWithChildren } from 'react';
import ICalendarLink from 'react-icalendar-link';

declare module 'react-icalendar-link' {
  const ICalLink: typeof PropsWithChildren<ICalendarLink>;
  export default ICalLink;
}
  • In your tsconfig.json:
{
  ...,
  "compilerOptions": {
    ...,
    "paths": {
      ...,
      "react-icalendar-link": ["src/types/react-icalendar-link"],
    }
  },
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants