Elliot Suzdalnitski
1 min readJun 22, 2019

--

Good article, thanks! While I totally agree that hooks are superior to class components in every way, this is not entirely correct: “React hooks let us write pure functional components without ever using the class syntax”. Technically, hooks make functional components impure.

The definition of a pure function is: “A pure function is a function where the return value is only determined by its input value”.

Hooks make the functional components impure since the returned markup is also dependent on whatever the hook returns.

--

--

No responses yet