Skip to content

Conversation

@devrnt
Copy link
Owner

@devrnt devrnt commented May 24, 2020

Using useState in IntercomProvider causes unnecessary rerenders. This is avoided by making use of useRef.

  • Drop the isBooted dependency in the useCallbacks's.
    As of now the IntercomProvider causes no rerenders on boot, update and so on...

@devrnt devrnt self-assigned this May 24, 2020
@github-actions
Copy link
Contributor

Size Change: -23 B (0%)

Total Size: 9.25 kB

Filename Size Change
dist/react-use-intercom.cjs.development.js 3.46 kB -12 B (0%)
dist/react-use-intercom.cjs.production.min.js 2.23 kB +1 B
dist/react-use-intercom.esm.js 3.42 kB -12 B (0%)
ℹ️ View Unchanged
Filename Size Change
dist/index.js 152 B 0 B

compressed-size-action

@devrnt devrnt merged commit 75b9906 into development May 24, 2020
@devrnt devrnt deleted the feature/avoid-rerenders branch May 24, 2020 12:32
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.

1 participant