nosco / hx

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

`defcomponent` API is very confusing #59

Open p-himik opened 5 years ago

p-himik commented 5 years ago

defcomponent requires the first function to behave like a constructor but it doesn't check its name and argument list. At the same time, React itself does not require an explicit constructor for class components.

lilactown commented 5 years ago

Agreed. defcomponent has not received much love, as I have only needed it for very small things like creating a general ErrorBoundary component.

Removing the need for an explicit constructor would be good just to remove the surprise.