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

'InstagramEmbed' cannot be used as a JSX component #377

Closed
arthurolmos opened this issue Apr 12, 2022 · 1 comment
Closed

'InstagramEmbed' cannot be used as a JSX component #377

arthurolmos opened this issue Apr 12, 2022 · 1 comment

Comments

@arthurolmos
Copy link

arthurolmos commented Apr 12, 2022

Guys, I started getting this error today:

'InstagramEmbed' cannot be used as a JSX component.
Its instance type 'InstagramEmbed' is not a valid JSX element.
The types returned by 'render()' are incompatible between these types.
Type 'React.ReactNode' is not assignable to type 'import("<...>/node_modules/@types/react-redux/node_modules/@types/react/index").ReactNode'.

I have no ideia what's behind it. Do you know have any clues?

My component:

import InstagramEmbed from "react-instagram-embed";

interface Props {
	href: string;
}

export const Instagram = ({ href }: Props) => {
	return (
		<InstagramEmbed
			url={href}
			clientAccessToken={process.env.NEXT_PUBLIC_INSTAGRAM_TOKEN}
		/>
	);
};
@arthurolmos
Copy link
Author

With further researched, i found that the issue is not with this package.

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

1 participant