Re:Simple React Patterns
by acemarke on Friday November 10, 2017 @12:51AM
(#15668229)
At the moment, React does not yet have support for stateful functional components. It's something they've said they would _like_ to research and implement down the road, but right now, component state and lifecycle methods requires class components.
[ Parent
| on HN ]
Or the use of something like recompose[1]'s `lifecycle` function[2].
1: https://github.com/acdlite/recompose
2: https://github.com/acdlite/recompose/blob/8c4ac2e4/docs/API....
Yeah, although that itself is implemented internally using an ES6 class:
https://github.com/acdlite/recompose/blob/8c4ac2e4a4cd8d60c8...