Refactor app state to be a state machine with access selectors

This commit is contained in:
Gabe Kangas
2022-05-25 20:38:40 -07:00
parent dde9878a46
commit 7b1667bf6a
21 changed files with 421 additions and 223 deletions

View File

@@ -0,0 +1,11 @@
import { ConnectedClientInfoEvent } from '../../../interfaces/socket-events';
export default function handleConnectedClientInfoMessage(
message: ConnectedClientInfoEvent,
setChatDisplayName: (string) => void,
) {
console.log('connected client', message);
const { user } = message;
const { displayName } = user;
setChatDisplayName(displayName);
}