I’m creating a quiz app and fetching the QnA from GPT4. I’m saving the selected radio button into a custom state. But when the user changes his option from the same set of options from a question, the custom state is storing multiple values from the same question which would not be suited to grade the quiz.
When you are saving into a custom state, instead of using add item to list, use the set list option. Or, before you add the item to the list, remove the previous item from the list in the custom state.