Class Vs Functional React Component ~ Tricky Closure Problem

Andreas Sujono
5 min readMar 27, 2023

Do you think class and functional component behaves the same way? think again

When hooks are introduced in 2018, many people think they should migrate from class components to functional components straight away. However, it’s not recommended to convert your previous class component codebase fully to a functional component with hooks because the behaviour might…

--

--

Andreas Sujono

A Full Stack Developer with 5 years of working experience, Web2 and Web3 Enthusiast, twitter: @AndreasSujono2