ReadonlyStore
A store a game reads, as a hook or with getState and subscribe,
and the engine alone writes: every state it hands out is read-only.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
State |
Call Signature
Section titled “Call Signature”ReadonlyStore():
Readonly<State>
A store a game reads, as a hook or with getState and subscribe,
and the engine alone writes: every state it hands out is read-only.
Returns
Section titled “Returns”Readonly<State>
Call Signature
Section titled “Call Signature”ReadonlyStore<
Selected>(selector):Selected
A store a game reads, as a hook or with getState and subscribe,
and the engine alone writes: every state it hands out is read-only.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Selected |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
selector |
(state) => Selected |
Returns
Section titled “Returns”Selected
Properties
Section titled “Properties”| Property | Type |
|---|---|
getInitialState |
() => Readonly<State> |
getState |
() => Readonly<State> |
subscribe |
(listener) => () => void |