Fix network state order bug

This commit is contained in:
Mitchell McCaffrey 2021-01-01 13:25:19 +11:00
parent dd308ecab0
commit ec3aa6ea11

@ -14,8 +14,8 @@ function useNetworkedState(
// Update dirty at the same time as state
const setState = useCallback((update, sync = true) => {
_setState(update);
dirtyRef.current = sync;
_setState(update);
}, []);
const eventNameRef = useRef(eventName);