Comments (3)
I'm interested to know how you're considering using react-intercom
. We handle this by using the component on two different branches of our application: /app
and /marketing
essentially. So when you go from marketing to the logged in version of the site, intercom shuts down and boots again, regardless of login status (populating it with user data in either case, if any).
This prompts me to wonder if there is any reason to recommend against that behavior. and whether that is compatible with public sites that have logins (or would that use case make this moot?).
Does that pattern work for you? This behavior could be added to the API, but I'm not sure that managing it explicitly is better than letting it happen automatically depending on your routes. Interested to know how this relates to your use case.
from react-intercom.
In our specific case we have 3 brunches and only contains Intercom.
Our pre login pages on that branch do not share a common higher order component, so we would have needed to either add it to several parent components, or create a logical parent for all non logged-in pages for this purpose alone.
We do have a root parent for that entire branch so it made sense for us to put it there, wrapping it in a component that supplies the required info and also preforms the shutdown/restart commands in case the logged in/out state changed.
Regarding if this is a better then the current behavior is an interesting question.
I assume the only differences are that the component could be added to higher order components and that the instead of deleting Intercom from window
and re-running the snippet, a boot command could be passed in instead.
from react-intercom.
I assume the only differences are that the component could be added to higher order components
Can you elaborate on this? What I want to avoid is something like a designated prop like loggedIn
, which feels weird when its value is false while user info is being passed--this kind of leans away from a single source of truth, which should be the intercom settings.
One solution I see is checking in componentWillRecieveProps
whether the intercom user settings exist and are being removed, and if so, restart. Does that work for you? I'll need to go back and confirm with Intercom documentation that this makes sense though.
from react-intercom.
Related Issues (20)
- Support for user_hash for Identify Verification HOT 1
- Intercom iframe mounting multiple times HOT 4
- customise the styling of intercom HOT 2
- Not able to use IntercomAPI HOT 2
- Receiving multiple 'rate_limited_update' errors in console HOT 8
- React 16.9 - Warning: componentWillReceiveProps has been renamed, and is not recommended for use. HOT 3
- 2.0 Refresh HOT 17
- Calls to Intercom('update') should be placed in effect not in render method HOT 2
- Thank you HOT 2
- Access to `Intercom('show');` Function HOT 2
- Create a hook in react-intercom 2.0 HOT 1
- Types for IntercomAPI HOT 3
- Please update to UNSAFE_* HOT 2
- Intercom API should take a method name and an object, not array. HOT 2
- user signout on unmount HOT 5
- react-dom.development.js:12449 Warning: componentWillReceiveProps has been renamed, and is not recommended for use HOT 2
- Unable to see intercom messenger HOT 3
- Instructions result in type error HOT 1
- Not initializing when user is using adblocks HOT 1
- window.intercom("update") not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-intercom.