score:0

you can do this ...

  useEffect(() => {
    localStorage.setItem('tasks', JSON.stringify(tasks))
    props.addList(tasks);
  }, [tasks])

here right after setting the tasks into local storage you can send the data to parent.


Related Query

More Query from same tag