You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/docs/07-api.md
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,38 @@ var reactor = Nuclear.Reactor(config)
19
19
20
20
**Configuration Options**
21
21
22
-
`config.debug` Boolean - if true it will log the entire app state for every dispatch.
22
+
`config.debug` Boolean - if true it will enabled logging for dispatches and throw Errors in various circumstances described below.
23
+
24
+
**config.options** (added in 1.3)
25
+
26
+
If `config.debug` is true then all of the options below will be enabled.
27
+
28
+
`logDispatches` (default=`false`) console.logs for every action. If disabled `logAppState` and `logDirtyStores` will be ignored, as no dispatch logging is occurring.
29
+
30
+
`logAppState` (default=`false`) console.logs a snapshot of the entire app state after every dispatch. Disabling this can improve performance.
31
+
32
+
`logDirtyStores` (default=`false`) console.logs what stores have changed after each dispatched action.
33
+
34
+
`throwOnUndefinedDispatch` (default=`false`) if true, throws an Error if a store ever returns undefined.
35
+
36
+
`throwOnNonImmutableStore` (default=`false`) if true, throws an Error if a store returns a non-immutable value. Javascript primitive such as `String`, `Boolean` and `Number` count as immutable.
37
+
38
+
`throwOnDispatchInDispatch` (default=`true`) if true, throws an Error if a dispatch occurs in a change observer.
0 commit comments