Question T15982
Visible to All Users

"survey-react" vs "survey-react-ui"

created 2 years ago

Hi,

I have recently upgraded to the latest version, I can see the examples install the <Survey /> component using "survey-react-ui".

What package should I use and where do I import my components from? Looks like I possibly have been doing it wrong

Code
import * as SurveyReact from 'survey-react';

Thanks

Answers approved by surveyjs Support

created 2 years ago

Hello Ahmad,
We have separated the survey data model from the rendering code. This change has enabled us to test the data model independently of rendering and reuse the data model across all our products. As a result, the total size of our bundles was reduced.

In the latest version, the survey-react package is no longer needed. Please use the following bundles:

  • survey-core (platform-independent survey data model)
  • survey-react-ui

Now, import a Model from the 'survey-core' module. To render a survey, import Survey from 'survey-react-ui'. For more details, visit Add a Survey to a React Application.

Please let me know if you have any further questions.

    Comments (2)

      Awesome thank you! Will work on that upgrade now :)

        You're always welcome. Please feel free to contact us if you have any further questions.