Did you deselect a domain?
this.setState is asynchronous
and what to do 😐
wait for it to change ofc
async await things?
why would you console.log state right after updating it?
to see what's happening
well, no I need state to be of domains I select
Let's assume that it works correctly
it will be when react thinks it's good time to update the state
is there a way to force it?
can you explain why you need the new state between setState and componentDidUpdate?
Seems like useEffect is what you want
he uses class components for some reason, it won't work there
Обсуждают сегодня