colyseus-schema-hooks
v1.0.2
Published
React hooks for @colyseus/schema
Downloads
39
Maintainers
Readme
⚡ Colyseus Schema Hooks
React hooks for @colyseus/schema
.
Install
npm i colyseus-schema-hooks
.
Hooks
Get actual value of Schema property
const value = useSchemaValue(schema, prop);
Subscribe to updates of Map/Set Schema
useSchemaListener(schema, {
onAdd: (item) => {},
onChange: (item) => {},
onRemove: (item) => {},
}, [depends]);