DEV Community

Discussion on: The Hitchhikers Guide to Refs

Collapse
 
dance2die profile image
Sung M. Kim • Edited

Thank you selbekk for the post.

I'd also like to add to When to use ref using Dan's tweet from yesterday by showing one of the ways to encapsulate an imperative logic.

One can extract the imperative logic out of the component and encapsulate in a class using a ref.