maps.app.goo.gl/wiqmAAfytD8q...
maps.app.goo.gl/wiqmAAfytD8q...
Without this structure misalignment is pretty much guaranteed
Without this structure misalignment is pretty much guaranteed
"He had to split"
"He was a real pain in the neck"
"I'm not into politics. I'm into survival"
"He had to split"
"He was a real pain in the neck"
"I'm not into politics. I'm into survival"
addOptimisticMessage();
startTransition(async () => {
and only needing an async function in the transition
addOptimisticMessage();
startTransition(async () => {
and only needing an async function in the transition
startTransition(async () => {
setOptimisticLiked(!optimisticLiked);
try {
const response = await likeRequest(liked);
setLiked(response.liked);
} catch (err) {}
});
};
Working example here: codesandbox.io/p/devbox/lik...
startTransition(async () => {
setOptimisticLiked(!optimisticLiked);
try {
const response = await likeRequest(liked);
setLiked(response.liked);
} catch (err) {}
});
};
Working example here: codesandbox.io/p/devbox/lik...