question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot update during an existing state transition

See original GitHub issue

I’m getting a console error whenever I switch pages.

the json is nothing special:

{
	"pages": [{
		"name": "page1",
		"elements": [{
			"type": "text",
			"name": "question1"
		}, {
			"type": "checkbox",
			"name": "question2",
			"choices": ["item1", "item2", "item3"]
		}, {
			"type": "radiogroup",
			"name": "question3",
			"choices": ["item1", "item2", "item3"]
		}]
	}, {
		"name": "page1",
		"elements": [{
			"type": "text",
			"name": "question1"
		}, {
			"type": "checkbox",
			"name": "question2",
			"choices": ["item1", "item2", "item3"]
		}, {
			"type": "radiogroup",
			"name": "question3",
			"choices": ["item1", "item2", "item3"]
		}]
	}]
}

and I have the Survey object inside a render function:

render(){
        return(
            <Card>
                <CardContent>
                    <Survey.Survey
                        json={this.props.surveyJson}
                        onComplete={this.props.onSubmit} />
                </CardContent>
            </Card>
        );
    }

I’m also using react-redux

any ideas?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
RoboSparrowcommented, Nov 14, 2018
1reaction
Yourgenecommented, Nov 9, 2018

@dmitrykurmanov thanks for what you did, and your support.

About that :

PPS: if you are reactjs developer please feel free to check our reactjs implementation (https://github.com/surveyjs/surveyjs/tree/master/src/react) and suggest us (or pull request) any changes.

I’m for the moment a beginner with react, I have not enough experience to do that, unfortunately. I will talk about that to my coworker, maybe he will be able to help you.

Again, thanks for everything

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning: setState(...): Cannot update during an existing state ...
Cannot update during an existing state transition (such as within `render` or another component's constructor). Render methods should be a pure function of ......
Read more >
Diagnosing React's "Cannot update during an existing state ...
The problem comes when trying to inject this initial value into a component that is managing its own state for an input's value....
Read more >
setState(...): Cannot update during an existing state transition ...
I have a react component which is basically a form that submits a company's data. Everything is okay till I fill the form...
Read more >
react_bad_update_state - Rule | DeepScan
Updating the state inside the specific lifecycle methods of a React ... Cannot update during an existing state transition (such as within ...
Read more >
setState(…): Cannot update during an existing state transition ...
to a version where the bind is within the constructor. The reason for that is that bind in the render view will give...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found