I wonder if the setDiagnostics
interface might be improved by taking view
as a parameter rather than state
, in which case it would call view.dispatch
automatically to dispatch the effects?
Before:
view.dispatch(setDiagnostics(state, diagnostics))
(easy to forget the view.dispatch
wrapper and wonder why nothing’s happening)
After:
setDiagnostics(view, diagnostics)