title: Nothing displays when I want to edit in ReactJS
body: <p>When I want to edit my input nothing displays and I have this error</p>
  <blockquote>
  <p>Warning: A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: <a href="https://reactjs.org/link/controlled-components" rel="nofollow noreferrer">https://reactjs.org/link/controlled-components</a> input form</p>
  </blockquote>
  <p>But I have output in my console.log.</p>
  <pre><code>import axios from &quot;axios&quot;;
  import React, { useEffect } from &quot;react&quot;;
  import { useParams } from 'react-router-dom'
  import { useState } from &quot;react&quot;;
  
  const Edituser = () =&gt; {
      const { id } = useParams();
  
      const [user, setUser] = useState({
          name: &quot;&quot;,
          email: &quot;&quot;,
          password: &quot;&quot;,
          c_password: &quot;&quot;,
          role: &quot;&quot;
  
      });
  
      const { name, email, password, c_password, role } = user;
      const onInputChange = e =&gt; {
          setUser({ ...user, [e.target.name]: e.target.value })
  
      };
      useEffect(() =&gt; {
  
          Updaate();
      },
          []
      );
  
      const Updaate = async () =&gt; {
          const response = await axios.get(`http://127.0.0.1:8000/api/edit-user/${id}`);
          setUser(response.data)
          console.log(response.data)
      };
      const Updateuser = async e =&gt; {
          e.preventDefault();
          await axios.put(
              `http://127.0.0.1:8000/api/update-user/${id}`, user
          );
      };
      return (
          &lt;form className=&quot;register-form&quot;&gt;
              &lt;div className=&quot;head-register&quot; &gt;
                  &lt;h3&gt;register&lt;/h3&gt;
              &lt;/div&gt;
              &lt;label htmlFor=&quot;name&quot;&gt;Username&lt;/label&gt;
              &lt;input name=&quot;name&quot; onChange={e =&gt; onInputChange(e)} value={name} &gt;&lt;/input&gt;
              &lt;h1&gt;hello&lt;/h1&gt;
          &lt;/form&gt;
      );
  }
  export default Edituser;
  </code></pre>