Clean React code with useImperativeHandle
A practical look at exposing focused imperative methods from a child component while keeping state and behavior close to where they belong.

I design and build interfaces for web and desktop applications.
I have worked on products in AI, security, ecommerce, and EdTech. At RIGR AI, I build privacy-sensitive software that supports offline and air-gapped deployments.
Outside work, I write about JavaScript and React and build open-source tools for interface theming.
Notes on JavaScript, React, and the patterns that make software easier to understand.
useImperativeHandleA practical look at exposing focused imperative methods from a child component while keeping state and behavior close to where they belong.
Functions, lexical scope, memory, and the reason a closure can remember the environment where it was created.