Fang Jin
1 min readMar 3, 2019

--

Yeah I agree, state is something to get a component very lengthy most of time. When I look at a codebase, I normally look for these states and see if i can extract them out into a render prop / Hoc component. A clean code normally would be written via pure functions. If a file contains one main pure function, it’ll be relatively difficult to make it messy later. But who am I to know :)

--

--

Fang Jin
Fang Jin

Written by Fang Jin

Front-end Engineer, book author of “Designing React Hooks the Right Way” and "Think in Recursion"

No responses yet