Skip to content

Memoize hook output value#32

Open
mrnix wants to merge 1 commit into
trekhleb:masterfrom
mrnix:patch-1
Open

Memoize hook output value#32
mrnix wants to merge 1 commit into
trekhleb:masterfrom
mrnix:patch-1

Conversation

@mrnix

@mrnix mrnix commented Jun 22, 2021

Copy link
Copy Markdown

Avoid re-rendering of components that use the hook.

Avoid re-rendering of components that use the hook.
@behnammodi

Copy link
Copy Markdown
Contributor

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants