mirror of
https://github.com/urbit/shrub.git
synced 2024-12-24 03:14:30 +03:00
virtualContext: drop useLayoutEffect
This commit is contained in:
parent
aaea592cfc
commit
7a6b2eb015
@ -43,8 +43,8 @@ export function useVirtualResizeState(s: boolean) {
|
||||
[_setState, save]
|
||||
);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
restore();
|
||||
useEffect(() => {
|
||||
requestAnimationFrame(restore);
|
||||
}, [state]);
|
||||
|
||||
return [state, setState] as const;
|
||||
@ -58,7 +58,7 @@ export function useVirtualResizeProp(prop: Primitive) {
|
||||
save();
|
||||
}
|
||||
|
||||
useLayoutEffect(() => {
|
||||
useEffect(() => {
|
||||
requestAnimationFrame(restore);
|
||||
}, [prop]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user