DEV Community

Discussion on: Reinventing the Wheel With React Hooks

Collapse
 
isaachagoel profile image
Isaac Hagoel

I agree about some hooks being much nicer than others and feel natural while some feel straight out forced (probably in the name of replacing classes completely as you said). I think it is fair to call the original functional components pure functions. The get props and input and emit jsx (always the same jsx given the same props). You could, in theory, do side effects inside (like making an ajax call) but that would result in terrible performance and wasn't the intent.