React hook returning the current editor context (dirty set), re-rendering when it changes. Handy for a contribute dialog: const { dirtyPaths } = useEditorContext() to show "you'll save N files" before calling contribute().
const { dirtyPaths } = useEditorContext()
contribute()
React hook returning the current editor context (dirty set), re-rendering when it changes. Handy for a contribute dialog:
const { dirtyPaths } = useEditorContext()to show "you'll save N files" before callingcontribute().