Closed ckirkendall closed 7 years ago
@alesguzik - I finally got around to adding in a custom selector setup. The selectors first-match
and nth-match
should eliminate the need for https://github.com/ckirkendall/kioo/pull/57
This allows custom selectors to be added by the user but provides a set of base selectors as defaults in addition to the enlive selectors.
Thanks, I am writing tests right now for that.
I really like the approach! I thought it could be close to impossible with state because the component is rerendered, but didn't realised that selectors are actually executed only once, at compile-time. Great work!
This adds the ability to register custom selectors to a naked symbol and provides two new selectors not in enlive (first-match and nth-match).
example usage:
note: the second symbol must include the fully qualified namespace for this to work.