What's the use of the logOnly option in ngrx DevTools?
If you scroll down a little bit on that link you sent you will see:
logOnly: boolean - connect to the Devtools Extension in log-only mode. Default is false which enables all extension features.
With a link to the extensions features.
Based on this we can assume that setting logOnly
to true
will switch the following redux-devtools-extension features off:
const composeEnhancers = composeWithDevTools({
features: {
pause: true, // start/pause recording of dispatched actions
lock: true, // lock/unlock dispatching actions and side effects
persist: true, // persist states on page reloading
export: true, // export history of actions in a file
import: 'custom', // import history of actions from a file
jump: true, // jump back and forth (time travelling)
skip: true, // skip (cancel) actions
reorder: true, // drag and drop actions in the history list
dispatch: true, // dispatch custom actions or action creators
test: true // generate tests for the selected actions
},
});
This is ideal for production environments as you may not need or want these primarily dev-focused features running in your live application.