# compose

Tariyel Islami

03/26/2023, 9:41 PM
Hello friends. How do you develop your user retention approach for a social media application? 1. Do you keep the user’s ID or user model when they log in? 2. Where do you keep the ID or user model? 3. When a user enters another user’s profile within the application, where do you keep this user? (For example, how do you update this user’s information when you follow them?) In general, how do you approach user-related issues? What is the best practice for this?

Colton Idle

03/26/2023, 9:47 PM
I don't understand question 3, but for 1 and 2 I keep the users information, authentication state, auth token, etc all in an AppStateHolder object so it can be accessed all throughout the app.


03/26/2023, 11:26 PM
For question number 3, you have 2 scenarios: same device, same app installation: just compare with the saved user in the local database from previous users. same device, different app installation: you can collect the device metadata, construct keys over it, and use as a comparison;