Multiple rerender requests on same component
L3P3 opened this issue · comments
Len commented
function Parent() {
hook_rerender();
console.log('Render!');
return [
node(Child),
];
}
function Child() {
const [state, state_set] = hook_state(false);
hook_effect(() => {
setTimeout(() => {
state_set(true);
}, 0);
});
return null;
}
Expected: Message printed 60 times per second.
Got: Message printed 120 times per second, depending on whether state_set
was called. When commenting that call, it is 60 times per second again.