How do I make the answers to the survey persist with react and redux?
See original GitHub issueWhat is the current behavior?
The issue/question: Suppose the user enters male for a question with a radio button, then goes to another page and comes back to the survey, the radio button for male is no longer selected.
My current solution: I am storing the answers in redux and passing the answers in the react component with the data prop like this:
<Survey
data={ props.questions[props.page].answers}
....
....
/>
Where the prop I am passing in is the answers object of key value pairs. Am I doing this the proper way?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Redux/React-Redux and Redux-Persist only persisting first ...
You can add one first parameter more, to create a new object that will have the state properties with the new foo one:...
Read more >Persist state with Redux Persist using Redux Toolkit in React
Let's learn how to use Redux Persist to save the state in persistent storage so that even after a refresh, the data will...
Read more >Persist data with Redux · Issue #10 - GitHub
My question is , how can I preload those answers?, in the event that the user answers 50% of the survey, how can...
Read more >Redux-persist: The Good Parts. Using the logger ... - codeburst
Persisting state across sessions perceives as simple but is actually dreadfully complicated. The number of edge cases regarding the user and how they...
Read more >Build Quiz App with ReactJS and Redux - YouTube
We are gonna use reactJs, Redux, and for the API we use Open Trivia, we also learn how to create custom hooks.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@john1625b, I’ve created branch “redux” in on our quick_start_repo. Could you please check it?
@john1625b, yes thank you! I’ve lost it 😃