Closed trquoccuong closed 9 years ago
Calling setState
on a component should cause it to re-render. You can force a re-render by using the forceUpdate
function.
This sounds like a usage question rather than a bug in React. We use github issues to track bugs in React, so I'm going to close this out. Feel free to continue the discussion on this thread, or take such discussions to StackOverflow.
This not prolem with setState. It rerendered but the checked info didn't render
@trquoccuong take a look at the documentation on controlled components (http://facebook.github.io/react/docs/forms.html#controlled-components). You will likely want to handle the user checking a box so you can set the checked
prop.
I update new version for easy to debug. Everything rerender but the checked status isn't remove. I can set checked prop to it but I think it not need here. Change question all answer changed but status dont . Problem here : I rerender input form but checked not so strange
Now I have solution for that http://stackoverflow.com/questions/31881266/reactjs-rerender-input-but-dont-change-checked-status But I think it should be an improvement
I make a quiz app with React. When I use logic nextQuiz , all state is ok but this dont change checked info( I dont use any state or props for manage this). My mini project here "https://github.com/trquoccuong/learn-react/tree/master/QuizGame" Problem is it rerender but dont rerender check info
I update a small version here https://jsfiddle.net/bsn6ckgv/29/