Passing data from one state to another state in react

const [object, setObject] = useState({
        id: null,
        created_date: "2021-02-18",
        name: "",

i want to pass the create_date value to anther state

const [notify, setNotify] = useState({
        id: 5,
        created_by: "1",
        notification:"object added",

here, i want that created_date value in received_date

110 thoughts on “Passing data from one state to another state in react”

  1. What’s Going down i’m new to this, I stumbled upon this I’ve found It positively useful and it has aided me out loads.
    I’m hoping to give a contribution & help different customers like its helped me.
    Great job.


Leave a Comment