CodePen doesnt open My react project prepared in VS

I have created quoteMachine in Visual Studio.I copied some codes to codepen.But I cant make it working.Help me

https://codepen.io/sayin47/pen/GRrGpOG

  1. Delete these imports at the beginning, you’re already importing them in Pen settings:
import reactUsestateref from "https://cdn.skypack.dev/react-usestateref@1.0.5";
import * as reactUse from "https://cdn.skypack.dev/react-use@17.2.3";
  1. Add “React” to your useState and useEffect, for example
 const [error, setError] = useState(null);

should become

 const [error, setError] = React.useState(null);

I edited it but it still doesnt work
https://codepen.io/sayin47/pen/GRrGpOG

You forgot to change ‘useEffect’ to ‘React.useEffect’

1 Like

it is working but twitter posting now doesnt work:)

As far as I understand twitter web intents cannot be loaded inside an iframe and codepen is an iframe

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.