Reports the latest state of a subject by resolving all the values deeply contained within by using nestSignal.
By default the output is generated using a console.log
, but this can be changed with the reporter
option.
The Subject can be anything, but to be effective it should be a signal, an object that contains signals, or an array of signals.
The inspect function will only output changes when the application is in development mode. In production mode, it will do nothing. You can change this and other behaviors from the function's options or by modifying modifying values in INSPECT_DEFAULTS
. Changing this will affect all instances of inspect
.
You'll need to see the browser's console to see output of inspect.
In this demo the custom reporter can be disabled by a signal and the output formatting stands out. You'll need to see the browser's console to see output of inspect.
In this demo the entire state of the component is inspected by calling inspect(this)
. You'll need to see the browser's console to see output of inspect.