use-position icon indicating copy to clipboard operation
use-position copied to clipboard

Memoize hook output value

Open mrnix opened this issue 4 years ago • 1 comments

Avoid re-rendering of components that use the hook.

mrnix avatar Jun 22 '21 17:06 mrnix

Why do we need that? we always destruct output of usePosition ex:

const {
  latitude,
  longitude,
  speed,
  timestamp,
  accuracy,
  error,
} = usePosition();

behnammodi avatar Sep 29 '21 14:09 behnammodi