Skip to content
Charles Demers edited this page Aug 20, 2024 · 2 revisions

Houston

Houston is a library that makes it easy to write concise, robust, and beautiful asynchronous code.

It provides you with a powerful Task primitive, which offers the following benefits:

  • Tasks, unlike Promises, support cancelation.
  • Tasks expose their underlying state (whether they're running or idle) which makes it trivial to build loading indicators without having to manually track / mutate state yourself.
  • Task Modifiers make it trivial to prevent two executions of the same task from running at the same time, e.g. you can prevent double form submissions using the drop modifier, or you can configure a task to be restartable so that it starts over when you click a "Restart" button. Implementing this logic without tasks requires a lot of boilerplate code and defensive programming.
Clone this wiki locally