# Refs, Events and Escape Hatches

DevFeed: [Refs, Events and Escape Hatches](<https://devfeed.tech/articles/refs-events-and-escape-hatches-48228.md>)

Original publisher: [Read original article](<https://tkdodo.eu/blog/refs-events-and-escape-hatches>)

Published: 2022-09-17T00:00:00Z

Content type: article

Language: en

Sources: [TkDodo](<https://devfeed.tech/sources/tkdodo-s-blog.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [hooks](<https://devfeed.tech/topics/hooks.md>), [callback](<https://devfeed.tech/topics/callback.md>), [function](<https://devfeed.tech/topics/function.md>)

Tags: [callback](<https://devfeed.tech/tags/callback.md>), [component](<https://devfeed.tech/tags/component.md>), [hooks](<https://devfeed.tech/tags/hooks.md>), [refs](<https://devfeed.tech/tags/refs.md>), [render](<https://devfeed.tech/tags/render.md>)

## AI overview

This React article explains how refs provide stable containers for mutable values without triggering component re-renders. It presents refs as an escape hatch from React's one-way data flow and discusses using them to avoid dependency-array and function-memoization issues, including a debounced callback example.

## Source excerpt

Refs can provide a way to sidestep dependency arrays without violating any rules, and the proposed useEvent hook might make working with functions and effects a lot easier...