Skip to content

Instantly share code, notes, and snippets.

View aleksailosey's full-sized avatar
:electron:

Aleksai Losey aleksailosey

:electron:
View GitHub Profile
import React from "react";
import ReactDOM from "react-dom";
import { ChakraProvider, DarkMode, Button, LightMode } from "@chakra-ui/react";
import type { ApplicationProps } from "../../shell/src/types";
import { CacheProvider } from "@emotion/react";
import createCache from "@emotion/cache";
function Root(props: ApplicationProps) {
return (
<>
@alexpchin
alexpchin / socket-cheatsheet.js
Created December 15, 2015 16:58
A quick cheatsheet for socket.io
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender