This tearing thing, anyone actually met it in practice? Because I usually just rerender the whole app for any state update, I know it's supposed to be slow or wasteful, but I never had big enough app for this to matter. I mean, unless it's a high fps game, I can't imagine how.
I'm not sure how up to date this is, but is answering a lot of ??? I have atm: https://gist.github.com/Jessidhia/49d0915b7e722dc5b49ab9779b5906e8
one question I still have is whether priority is conveyed across async frames, e.g.:
function sleep(ms) {
return new Promise(res => setTimeout(res, ms));
}
function inc(n) {
return n + 1;
}
function Button() {
let [count, setCount] = useState(0);
let onClick = async () => {
await sleep(1000);
setCount(inc);
}
return <button onClick={onClick}>+</button>
}
I don't think it does and I am not sure I wish it to be. Reason being that if a users starts clicking vehemently repepeatedly and that means launching lots of background requests, I don't want later clicks to be blocked by the responses given to earlier clicks
and that's true even if it's not user's fault but let's say, network is slow and piles up responses that arrive at the same time