title: How to get input text's value and pass it from child to parent component?
body: <p>When I try to change task which I have done before, input doesn't changes. Because it takes the value from <code>text</code> but not from object which I pushed in <code>tasks</code> array</p>
  
  <p><strong>Component's code:</strong></p>
  
  <pre><code>const CurrentTaskInformation = ({
    status,
    text,
    deleteTask,
    changeStatus,
    editTask,
  }) =&gt; {
    const [editMode, SetEditMode] = useState(false)
  
    const changeEditMode = () =&gt; {
      SetEditMode(!editMode)
    }
  
    return (
      &lt;div className="row justify-content-center current-task"&gt;
        {editMode === false ? (
          &lt;div
            onDoubleClick={changeEditMode}
            onClick={changeStatus}
            className="current-task-container"
          &gt;
            &lt;div className={status === true ? 'isDone' : 'isNotDone'}&gt;{text}&lt;/div&gt;
          &lt;/div&gt;
        ) : (
          &lt;input
            autoFocus={true}
            onBlur={changeEditMode}
            value={text}
            onChange={(e) =&gt; editTask(e.target.value)}
          /&gt;
        )}
        &lt;button onClick={deleteTask}&gt;Delete&lt;/button&gt;
      &lt;/div&gt;
    )
  }
  
  export default CurrentTaskInformation
  </code></pre>
  
  <p><strong>Reducer's code:</strong></p>
  
  <pre><code>const initialState = {
    tasks: [],
    text: '',
    baseFilter: '',
  }
  
  const taskReducer = (state = initialState, action) =&gt; {
    switch (action.type) {
      case ADD_TASK: {
        let task = {
          id: shortid.generate(),
          text: state.text,
          status: false,
        }
        return {
          ...state,
          tasks: [task, ...state.tasks],
        }
      }
  
      case EDIT_TASK: {
        return {
          ...state,
          tasks: state.tasks.map((t) =&gt;
            t.id === action.id ? { ...t, text: action.newTask } : t
          ),
        }
      }
  
      default:
        return state
    }
  }
  
  export const addTask = () =&gt; ({ type: 'ADD_TASK' })
  export const editTask = (id, newText) =&gt; ({ type: 'EDIT_TASK', id, newText })
  </code></pre>
  
  <p><strong>Parent component:</strong></p>
  
  <pre><code>{currentTasks.map((t) =&gt; (
    &lt;CurrentTaskInformation
      key={t.id}
      tasks={tasks}
      editTask={() =&gt; editTask(t.id)}
      text={t.text}
      status={t.status}
      baseFilter={baseFilter}
      deleteTask={() =&gt; deleteTask(t.id)}
      changeStatus={() =&gt; changeStatus(t.id)}
    /&gt;
  ))}
  </code></pre>