lilactown / helix

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

displayName should be static in defcomponent #92

Closed tomconnors closed 2 years ago

tomconnors commented 2 years ago

It looks like defcomponent should set "displayName" with the statics rather than w/ the instance methods/properties.

This gives me a component that uses HelixComponent as its display name:

(h/defcomponent MyComponent
  (render [this] (helix.dom/div)))

but this gives me one w/ MyComponent as the display name:

(h/defcomponent MyComponent
  ^:static (displayName "MyComponent")
  (render [this] (helix.dom/div)))
lilactown commented 2 years ago

ah yep! should be an easy fix

lilactown commented 2 years ago

Fixed in latest master! Thanks for the report