After that, this data will save into state and For example, we can use the onChange function in Controlled Component to get the value when the input value is updated, and we can also access the value using DOM like ref. To write an uncontrolled component, instead of writing an event handler for every state update, you can use a ref to get form values from the DOM. To access the input's DOM Example: