Comments (3)
@mihaerzen Yeah, I'd say that definitely you're right. I guess reasoning back in the days was to maybe with name give "a hint" where would be appropriate place for method to be called in the RN app itself, but obviously for your use case, it can be misguiding. By EOY we are most probably going to release next major SDK update where we have a chance to do API cleanup and this would definitely be one of the things on the list for React Native SDK.
Thanks for the suggestion! Will close this one for now, but in case you have any further questions or need assistance, feel free to comment/reopen.
Cheers!
from react_native_sdk.
Hi @mihaerzen
As far as initialisation of SDK is concerned, general rule of thumb is simply to try to do it ASAP in your app. Example we made with App.js
was just an example how this might be done, not mandatory to be done in that place if you don't have it. So as soon as you can, would be great.
And regarding componentWillUnmount
method -> this method cleans up callback methods from the app set on Adjust SDK for various things (you can check this in README, one can set callback for getting attribution, event/session tracking success/failure and deferred deep link information) and sometimes people tend to rerun SDK initialisation code multiple times so addition of this method in our API and advice where to call it was best effort to clean up these callbacks in order not to have them defined multiple times since SDK remembers only one. I'd say that if you make sure that SDK initialisation (Adjust.create
) is called just once, there's no need for you to invoke unmount method.
In case you have any further questions, feel free to ping.
Cheers
from react_native_sdk.
Thank you for your response @uerceg! It makes sense what you wrote.
As the method is called componentWillUnmount
it implies it should be used in the componentWillUnmount
react lifecycle hook but actually it's just a cleanup method. Maybe one proposal would be to re-name it to something which reflects that better. Maybe Adjust.destroy()
?
Again thank you for a fast reply, greatly appreciated!
from react_native_sdk.
Related Issues (20)
- referral handling on FE ? HOT 1
- setDeferredDeeplinkCallbackListener issue HOT 12
- Upgrading RN adjust sdk from 4.29.6 to 4.33.0 throws 500 error on Adjust.trackEvent() on iOS in Production. HOT 2
- deferred deeplinks do not work in case of reinstall. HOT 1
- Remove iAd framework attribution and use Apple Ads Attribution API HOT 6
- Cycle in dependencies between targets 'Adjust' and 'NotificationService' HOT 2
- When do we get invalid signature for an install? HOT 1
- Does deferred deep link won't work when your app isn't on the AppStore yet?
- No Documentation on App Secret HOT 1
- Google Play Console giving error 'Your advertising ID declaration in Play Console says that your app uses advertising ID. A manifest file in one of your active artifacts doesn't include the com.google.android.gms.permission.AD_ID permission.'
- Compilation failed HOT 1
- Compilation failed HOT 2
- how to remove redirect if apps are open ( my bad )
- setFbAppId support HOT 1
- Handle deeplinks with Expo router v3 HOT 1
- library 'Adjust' not found HOT 2
- [Question] SkAdNetwork direct install
- ATT Automatically Denied (requestTrackingAuthorizationWithCompletionHandler) - 17.4.1 HOT 4
- React Native 0.74 (Bridgeless) Support
- convertUniversalLink Android Implementation
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_native_sdk.