Re Render default radio checked
React gives the following example of handling default values of inputs, specifically on radio buttons. https://react.dev/reference/react-dom/components/input#displaying-inputs-of-different-types. For some reason, when I implement this the re render on refresh does not render correctly. The value is set correctly, but the render looks like it sets it, then unsets it. Has anyone experienced this before?
I will note, that when I change the name of the inputs, it doesn't do this, but instead rendes the default value correctly. The below would set it correctly.
but I need the name to be the same so that they can only select 1 option out of the 3.
– React
The library for web and native user interfaces
0 Replies