warnOnLargeValues
functionsignature
warnOnLargeValues(store, limits): UnsubscribeWarns, in development, when an event payload or a slice grows past a limit.
Parameters
| Name | Type | Description |
|---|---|---|
store | SizeWatchedStore |
| Name | Type | Description |
|---|---|---|
limits | LargeValueLimits |
Returns
Unsubscribe, A function that stops watching. In production it watches nothing and returns a no-op.
Example
example
if (import.meta.env.DEV) warnOnLargeValues(store, { maxSliceNodes: 20_000 });