what's the order of consecutive useState setters inside useEffect or handler in react?

Viewed 8

is there any promise about order of useState setters, lets say my code looks like this:

const [one,setOne]=useState(0)
const [two,setTwo]=useState(0)

and lets say theres a handler or a useEffect with the 2 consecutive lines:

setOne(1)
setTwo(1)

is there a guarantee on which setter runs first? I'm asking since its not the same as asynchronous function followed by synchronous function

0 Answers
Related