Skip to content

Instantly share code, notes, and snippets.

@barneycarroll
Created June 4, 2018 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barneycarroll/3ab454bb80e7a9d99e13400244e3cab8 to your computer and use it in GitHub Desktop.
Save barneycarroll/3ab454bb80e7a9d99e13400244e3cab8 to your computer and use it in GitHub Desktop.
A Mithril inspector overlay

Mithril debugger

Prioritised features:

  1. Pointer-based hover-overlay to highlight elements generated by Mithril
  2. With a view of their corresponding vnode & associated path
  3. That allows travel through path and vnode tree interface to highlight other elements

Followed by:

  • Patch reporter:
    • Receive inspectable logs for changes that occur on render
    • Monkey-patch Mithril to allow a freeze-inspect-step loop of the Mithril renders
  • Suggestions:
    • Surface Mithril code smells based on suspicious input to API
      • Non-functions bound to event attributes
      • Partially-keyed lists
      • Recycled / mutated vnodes
      • Fat components
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment