Open martmilitante opened 1 year ago
I'm trying to import this package via import reactSocialMediaEmbed from 'https://cdn.skypack.dev/react-social-media-embed'; using babel standalone and react.
import reactSocialMediaEmbed from 'https://cdn.skypack.dev/react-social-media-embed';
The problem is when I put it as a JSX Element in react, I'm getting an error
<script type="text/babel" data-type="module"> import reactSocialMediaEmbed from 'https://cdn.skypack.dev/react-social-media-embed'; const InstagramEmbed = () => { const Embed = reactSocialMediaEmbed .InstagramEmbed; return ( <Embed url="url" /> ); } // In App function App() { <InstagramEmbed /> } </script>
it give me Invalid hook call. Hooks can only be called inside of the body of a function component.
I'm trying to import this package via
import reactSocialMediaEmbed from 'https://cdn.skypack.dev/react-social-media-embed';
using babel standalone and react.The problem is when I put it as a JSX Element in react, I'm getting an error
it give me Invalid hook call. Hooks can only be called inside of the body of a function component.