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

How should this be integrated with React Native Navigation? #52

Closed
kaibarnes opened this issue Jan 8, 2019 · 3 comments
Closed

How should this be integrated with React Native Navigation? #52

kaibarnes opened this issue Jan 8, 2019 · 3 comments

Comments

@kaibarnes
Copy link

I'm currently working on an app using React Native Navigation and am having some trouble with your integration instructions.

The instructions say to use ComponentWillMount and ComponentWillUnmount in index.js. However React Native Navigation doesn't have a root component for those to be used in.

Do you have a recommended way to use your SDK with React Native Navigation?

@uerceg uerceg added the support label Jan 8, 2019
@uerceg
Copy link
Contributor

uerceg commented Jan 8, 2019

Hi @kaibarnes

We do not have recommended way for React native Navigation, not because there's not one, but rather because we haven't tried to make an app with usage of that component.

General rule of thumb for our SDK, regardless of which components and approach is used in app development is that it's initialisation should occur as soon as possible after your app launches so that data later displayed in the dashboard is as accurate as possible. When writing README, we identified ComponentWillMount as suitable place in RN app which we have made on our own to do the testing. If something like that doesn't exist for you, then simply initialise Adjust SDK as soon as possible inside of your app.

Call to Adjust.componentWillUnmount() is not even needed in case you are creating AdjustConfig object at just one place when initialising SDK and in no other place in your app.

In case you have any other questions, feel free to ping us in here.

Cheers

@kaibarnes
Copy link
Author

Thank you for the quick response @uerceg

Not calling Adjust.componentWillUnmount() seems like it will fix my problem then. Thanks a lot

@pke
Copy link

pke commented Jan 21, 2022

so Adjust.componentWillUnmount() is not required for proper tracking?
In which scenario would one call it?

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