News for hackers. Stuff that matters.
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.
Re:Simple React Patterns by bjeanes on Friday November 10, 2017 @01:12AM (#15668298)
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....

Re:Simple React Patterns by acemarke on Friday November 10, 2017 @01:17AM (#15668312)
Yeah, although that itself is implemented internally using an ES6 class:

https://github.com/acdlite/recompose/blob/8c4ac2e4a4cd8d60c8...