Skip to content

Instantly share code, notes, and snippets.

@plexus
Created March 10, 2019 13:30
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 plexus/3d9de31ff21080a68177024264dd635f to your computer and use it in GitHub Desktop.
Save plexus/3d9de31ff21080a68177024264dd635f to your computer and use it in GitHub Desktop.

Adding a higher level API to Trikl

Streaming Sunday afternoon at https://www.youtube.com/c/LambdaIsland/live

Towards the end of last year I created Trikl (https://github.com/lambdaisland/trikl), a library for building rich terminal interfaces that's modeled after Reagent. You write components using a variant of Hiccup, and trikl takes care of rendering them, applying smart diffing to minimize the amount of updates to send to the terminal, assuring updates always look smooth.

The idea with Trikl is to make it trivial for people to build their own tools and share them with their team or with the world, however using it myself recently to create a simple tool (an nREPL inspector), I realized I still spent way too much time on implementation details of the UI, this made me realize Trikl was still missing a few things to live up to its promise:

  • Component local state
  • Event handling at the component level
  • A richer set of UI components to build with

I already laid the foundations for the first two, the plan today is to create a new namespace, trikl.ui, which builds on trikl.core, but which takes away a lot of the boilerplate, and implements some of those components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment