3 ms·
> What's the rationale for allowing the components to be defined as functions in the first place? Intent: it makes clear that the component is stateless in a w
by masklinn 8y ago
> What's the rationale for allowing the components to be defined as functions in the first place?
Intent: it makes clear that the component is stateless in a way a class-based component does not.
- hoppelhase 8y agoThis is why I don't like the hooks concept introduced in the post. It breaks these semantics.
- econnors 8y agoThese semantics didn’t exist, anyway. Functional components can hold state through higher order components (eg connected to redux store), render props of children components, etc.