Immutable solution version
Boot Intercom once in your React entry component, not inside action creators
Complete solution
Load the Intercom snippet in index.html or your app entry component, then call window.Intercom('boot', {app_id: INTERCOM_APP_ID}) once, e.g. in the entry component constructor with any identify settings you need. Do not boot inside action creators or per-user fetch logic; boot once at startup and then push user changes with Intercom('update') when the user logs in or switches. And in an SPA, remember to call Intercom('update') on every route change so page views and targeted
Load the Intercom snippet in index.html or your app entry component, then call window.Intercom('boot', {appid: INTERCOMAPP_ID}) once, e.g. in the entry component constructor with any identify settings you need. Do not boot inside action creators or per-user fetch logic; boot once at startup and then push user changes with Intercom('update') when the user logs in or switches. And in an SPA, remember to call Intercom('update') on every route change so page views and targeted messages fire, the boot alone is not enough.
Context: Stack Overflow #42382809 (accepted answer, 7 votes): React + redux-segment user could not figure out where the app id goes or where to actually load Intercom. They tried loading it inside an action creator when grabbing the current user, and the widget never booted.
Evidence
Stack Overflow #42382809 (accepted answer, 7 votes): React + redux-segment user could not figure out where the app id goes or where to actually load Intercom. They tried loading it inside an action creator when grabbing the current user, and the widget never booted. Resolved: Load the Intercom snippet in index.html or your app entry component, then call window.Intercom('boot', {appid: INTERCOMAPP_ID}) once, e.g. in the entry component constructor with any identify settings you need. Do not boot inside action creators or per-user fetch logic; boot once at startup and then push user changes with Intercom('update') when the user logs in or switches. And in an SPA, remember to call Intercom('update') on every route change so page views and targeted messages fire, the boot alone is not enough. Source: https://stackoverflow.com/questions/42382809/how-do-i-add-the-intercom-script-in-my-react-app
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_FNQmdALMf3_NCRb84K0bPg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Boot Intercom once in your React entry component, not inside action creators <span>— Vectle</span></a>