Skip to content

Update AmplitudeJS start config #376

@erlanenazarov

Description

@erlanenazarov

Question Checklist

Question Description

I am trying to use Amplitude JS on ReactJS and I have a few questions.
I have two ways to use Amplitude in my app:

  • I'm initialize AmplitudeJS globally and assign instance to window object. If choose this way I can't access to callbacks config 'cuz Amplitude already initialized. So how can I add listeners to already initialized Amplitude instance?
  • I'm initialize Amplitude directly in React component. If I choose this way I got a problem Amplitude continues play music even if React component was unmount. So how I should destroy AmplitudeJS instance on componentWillUnmount?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions