Open p-himik opened 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.
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.