Question T14215
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

NextJS with SurveyJS

How can I use surveyjs in Next.js with TypeScript

created a year ago

The document show how to use in React.Js with JavaScript, but how I use it in Next.js

Answers approved by surveyjs Support

created a year ago

Hello,
You can follow our React get-started tutorials to integrate SurveyJS components to your Next.js application.
Add a Survey to a React Application

Take note that SurveyJS components should be rendered on the client side only. Therefore, please disable server-side rendering (SSR) for the SurveyJS components: Render client-side only component in Next.js.

JavaScript
const SSR = typeof window === 'undefined';

Then, you can include the !SSR check in your <div> element to conditionally render the client-side only SurveyJS component.

Please let me know if you have any questions or if you need further assistance.