When to use useMemo?

Basically the decision for whether to use useMemo is: Do I want this to run every single time the state changes? => Leave it plainIs it bad if this runs multiple times? => Yes useMemoIs this slow so it should only run when absolutely necessary => Yes useMemo