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

  1. Delete these imports at the beginning, you’re already importing them in Pen settings:
import reactUsestateref from "";
import * as reactUse from "";
  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

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.