lilactown / helix

A simple, easy to use library for React development in ClojureScript.
Eclipse Public License 2.0
627 stars 52 forks source link

Ignore quoted forms when searching for hooks #86

Closed SevereOverfl0w closed 3 years ago

SevereOverfl0w commented 3 years ago

Previously, a component containing a quoted form with a hook in would have been caught by the hooks detection (example below). Additionally, avoiding the postwalk improves the performance of the find-hooks function.

(defnc foo
  []
  (d/div
    (d/h1 "Usage example")
    (d/code (pr-str '(use-foo)))))