Amy Blankenship
Oct 19, 2022

--

Output of a function is not a side effect. An example of a side effect is for example a React component making an API call and then updating a Redux store. As long as you keep your components pure (all they do is render their properties), then you don't get side effects. When you start to have internal state, you have neither functional programming nor OO programming, but an unholy cross between the two.

https://medium.com/codex/can-we-all-just-admit-react-hooks-were-a-bad-idea-c48120c5188d

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

Responses (1)