question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type errors after migrating to v4

See original GitHub issue

I migrate to v4 and I’m now getting these type errors:

Type '{ children: Element; url: string; }' is missing the following properties from type 'Pick<Props<{ quote?: string; hashtag?: string; }>, "form" | "style" | "title" | "type" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | ... 264 more ... | "resetButtonStyle">': form, title, type, name, and 256 more.

I’m using it like this, nothing special:

<FacebookShareButton url={url}>
  <FacebookIcon {...iconProps} />
</FacebookShareButton>

It seems to require all props including native ones. I checked out the demo and it works as expected. I’m on the latest react and typescript versions.

Any ideas? @nygardk

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:14
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
scroobius-pipcommented, Jan 13, 2020

@nygardk any updates please ?

7reactions
eshtoncommented, Jan 7, 2020

Found a workaround until: https://medium.com/@tomsoir/typescript-how-to-rewrite-type-definition-file-file-d-ts-of-any-node-modules-package-1eed7f5630d1

declare module 'react-share' {
  declare const FacebookShareButton: any;
  declare const FacebookIcon: any;
  declare const TwitterIcon: any;
  declare const TwitterShareButton: any;

  export {
    FacebookShareButton,
    TwitterShareButton,
    FacebookIcon,
    TwitterIcon
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error after migrating to v4: Property 'message' does not exist ...
I upgraded to v4 the code below throws this error: Property 'message' does not exist on type 'FieldError | FieldErrors | FieldErrors[]'.
Read more >
Migrating to v4.0.0 - ESLint - Pluggable JavaScript Linter
Starting in 4.0.0, ESLint will raise an error if a property in a config file is unrecognized or has the wrong type. To...
Read more >
Error when changing data after migrating to vue-chartjs 4
I have a LineChart component that I migrated to the last version of VueChart (I put the template section and removed the draw...
Read more >
NET Framework 4 migration issues - Microsoft Learn
Learn about migration issues between .NET Framework 3.5 Service Pack 1 and .NET Framework 4, including fixes and changes for standards ...
Read more >
Migrating from v3 to v4 - Gatsby
After upgrading, run gatsby build and look for deprecation messages in the ... Starting with v4, context field is replaced with pageContext of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found