DEV Community

Discussion on: setState in Reactjs is not a function

Collapse
syntaxhacker profile image
syntaxhacker

you can just add this right?


.then((data) => {
        setPerson(data); 
        setCustomers(data) // You Need this For set Person to `state person`
      });
Enter fullscreen mode Exit fullscreen mode