We're Participating in #Hacktoberfest2024! 🤩 Check out our open issues and help us simplify multiplayer game development!
Docs
Actions

Actions

Actions, like in Redux or Flux are simple commands paired with input that are sent to a reducer in order to compute the next state.

const myAction = {
  type: 'incrementBy';
  payload: 1;
}

Public Actions

A Public Action, as its name implies is an Action that modifies the shared state (aka the public state), so everyone subscribed to it can get notified and see it.

const myPublicAction = {
  type: 'incrementBy';
  payload: 2;
  isPrivate: false;
}