react-live icon indicating copy to clipboard operation
react-live copied to clipboard

Require is not defined error in Next JS

Open aksjdjkasdjk opened this issue 1 year ago • 0 comments

When I try to import a thing the error comes "require is not defined".

const exampleCode = ` import FAQ from './FAQ'

const LoginComponent = () => {

const [showPreview, setShowPreview] = React.useState("Hi");

return (
  <div>
    <h3 className="bg-red-500">
    Login Component<br/><br/>
    {showPreview}
    <FAQ/>
    </h3>
   
  </div>
)

} render(<LoginComponent />) `;

aksjdjkasdjk avatar Jan 19 '24 17:01 aksjdjkasdjk