Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't sent request, when update copmonent props #35

Closed
SVITY opened this issue Jul 5, 2017 · 2 comments
Closed

Don't sent request, when update copmonent props #35

SVITY opened this issue Jul 5, 2017 · 2 comments

Comments

@SVITY
Copy link

SVITY commented Jul 5, 2017

It works fine 5-7 times, when props is updated. After that component does not send request to Intercom, when props is updated.

Any ideas? How to fix it?

@morgler
Copy link

morgler commented Jul 17, 2017

I noticed the same issue. I just installed react-intercom and connected my user for Intercom to the user in my redux store:

<Intercom appID="kh0il1tk" {...this.props.user}/>

const mapStateToProps = (state) => ({ user: state.user })

And the problem in my case – and maybe in your's, too – were the many updates in rapid in succession (e.g. because the user moves a slider on a form, which continuously updates the user's attributes). Most of the time I didn't see the slider's actual position in Intercom, but rather see some value that the slider had in between.

My solution was to throttle the sending of events to Intercom. I simply didn't listen to the onChange event of my range slider (which sends continuous data in most browsers), but listened to the onTouchEnd and onMouseUp events. The latter two events only trigger once the user releases the range slider.

Do you have a similar case where you produce updates of the user's attributes in rapid succession?

@nhagen
Copy link
Owner

nhagen commented Sep 1, 2019

Closing for now. If this is still a problem for anyone after #73 feel free to reply or create another issue.

@nhagen nhagen closed this as completed Sep 1, 2019
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

No branches or pull requests

3 participants