nhagen / react-intercom

A component to configure and enable Intercom in your react application
MIT License
237 stars 72 forks source link

Access to `Intercom('show');` Function #78

Closed toddgower-hiatus closed 4 years ago

toddgower-hiatus commented 4 years ago

Does this library provide access to Intercom functions that control when/how the messenger is presented? Can I simply call them using the IntercomAPI via import { IntercomAPI } from 'react-intercom';?

Redfern commented 4 years ago

It appears you can, i've just used the IntercomAPI method and it works fine.

e.g.

IntercomAPI('onShow', () => {
      // do something
});
IntercomAPI('show')
toddgower-hiatus commented 4 years ago

This was asked without full understanding of the lib. Closing...