Relative Content

Tag Archive for javascriptreactjsaxiosradio-button

React radio buttons do not change the state

I have two React components. The data comes here from an endpoint. I want to add Camera and BLEDevice items to this data and show it to the user. The user can change these two items via radio buttons. However, when the refresh button is clicked, I want this data not to be refreshed, but to remain what the user has selected. I prepared 2 components as below, but I cannot change the radio buttons. Even the logs in the onChange function do not work when I make a selection. What could be the problem here?