codeforboston / cliff-effects

Cliff effects guidance prototype (archived)

Home Page:https://codeforboston.github.io/cliff-effects/#/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switch to component classes instead of stateless functional components?

turnerhayes opened this issue · comments

Wanted to bring this up for discussion; it appears that Stateless Functional components (i.e. components declared as simple functions, not classes) are not (easily) selectable in React Devtools (intentionally). The $r shortcut is really useful for inspecting state and props. Should we convert our components to class components?

I believe Hot Module Reloading is also not available with SFCs (although not 100% on that).

commented

Hot reloading is fun, it's true. Can you link to an article or two on the advantages of stateless functional components so we can weigh pros and cons?

I'm a little skeptical, this seems like a lot of refactoring for what strikes me as a minor convenience for developers. IIRC, quite a few of the components in the app are SFCs already.