Closed georgejdli closed 4 years ago
What my package.json looks like (in case it's a versioning issue):
{
"name": "surveyjs-example",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"bootstrap": "^4.4.1",
"jquery": "^3.4.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1",
"survey-creator": "^1.5.18",
"survey-pdf": "^1.5.18",
"survey-react": "^1.5.18",
"surveyjs-widgets": "^1.5.18"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Ok I think I found the issue:
MyQuestions.js
Survey.Serializer.addClass(
"myquestion",
[
{ name: "text" }
],
function() {
return new MyQuestionModel("");
},
"checkboxbase"
);
Using "checkboxbase" seems to be causing the error. After I hit "next" the survey is probably trying to get the choices for the custom question - but there aren't any choices defined in the example. Quick fix was to replace "checkboxbase" with "question"
PR: https://github.com/surveyjs/surveyjs_react_quickstart/pull/18
Looks ok for me thank you for the contribution
I complete the first page of the sample survey, hit next, and I see this error in the browser console:
Doesn't seem to be an issue until I try to run React in strict mode and the app panics: