Fix network state order bug
This commit is contained in:
@@ -14,8 +14,8 @@ function useNetworkedState(
|
|||||||
|
|
||||||
// Update dirty at the same time as state
|
// Update dirty at the same time as state
|
||||||
const setState = useCallback((update, sync = true) => {
|
const setState = useCallback((update, sync = true) => {
|
||||||
_setState(update);
|
|
||||||
dirtyRef.current = sync;
|
dirtyRef.current = sync;
|
||||||
|
_setState(update);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const eventNameRef = useRef(eventName);
|
const eventNameRef = useRef(eventName);
|
||||||
|
|||||||
Reference in New Issue
Block a user