Before: client.send("hello", "world"); was sent from onJoin (in 02-state-handler.ts) but that resulted in the following warning on the console: onMessage not registered for type 'hello'.
Now: We listen to the 'hello' type and print the message onto the console. No warning, and we see a message when someone joins.
Before:
client.send("hello", "world");
was sent fromonJoin
(in02-state-handler.ts
) but that resulted in the following warning on the console:onMessage not registered for type 'hello'
.Now: We listen to the 'hello' type and print the message onto the console. No warning, and we see a message when someone joins.