skip to Main Content

Javascript – Unchecking Radio buttons is not working with React after useeffect

Below is my Form looks like in return section: <Form > <ListGroup > <ListGroup.Item className="text-start" > <div> <Form.Check type="radio" id="0" name="answer" label={questionsJSON.questions[num].answers[0]} value={questionsJSON.questions[num].answers[0]} onChange={e => setSelectedAnswer(e.target.value)} {...{ selectedAnswer } != null ? "checked" : null} /> </div> </ListGroup.Item> <ListGroup.Item className="text-start">…

VIEW QUESTION

React Native useState value not changing

I have a problem in making app with react native. I use useState, but its value is not updated and the component is not re-rendered. This is my code. import React, {useEffect, useState} from 'react'; import {View, Text, TouchableOpacity, Image,…

VIEW QUESTION
Back To Top
Search