Memo

Noun · Development

Definitions

  1. Short for memoization — caching the result of a function call so that subsequent calls with the same arguments return the cached value instead of recomputing. In React, `React.memo` is a higher-order component that skips re-rendering when props haven't changed, and `useMemo` caches computed values within a component.

    In plain English: Remembering the answer to a calculation so you don't have to redo it when the same question comes up again.

    Example: "Wrap that expensive list filter in useMemo so it doesn't recalculate on every keystroke."

Related Terms