useMemo recomputes only when deps change. Input: one line per render with the dep value (a single number). Print two lines: total computations, total cache hits.
Input: one dep per line.
Output: computations, then hits.
Your program reads from stdin and prints to stdout.
useMemo recomputes only when deps change. Input: one line per render with the dep value (a single number). Print two lines: total computations, total cache hits.
Input: one dep per line.
Output: computations, then hits.
Your program reads from stdin and prints to stdout.