colyseus-schema-hooks
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

⚡ Colyseus Schema Hooks

Version Small size Build

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]);

Package Sidebar

Install

npm i colyseus-schema-hooks

Weekly Downloads

44

Version

1.0.3

License

MIT

Unpacked Size

9.89 kB

Total Files

17

Last publish

Collaborators

  • neki-development