nosco / hx

A simple, easy to use library for React development in ClojureScript.
MIT License
247 stars 16 forks source link

Interceptors #1

Closed lilactown closed 5 years ago

lilactown commented 6 years ago

https://github.com/Lokeh/hx/commit/f8b755ecf21d954a675a7296a0d52b9f2abf6ad6 adds the API for registering interceptors. The default is currently to compile top-level hiccup, and to transform $ to calls to (compile-hiccup ...). Several people have commented on the use of $ so I'm considering switching that off by default.

There are currently two outstanding issues with the interceptor API:

  1. How should lib consumers register interceptors?

Interceptors must be registered via CLJ code at macroexpansion time, but apps that use this library are primarily CLJS.

  1. Modifying the interceptor stack as it's processed