I'm writing an offline RN app for fun in my free time.
So, a lot of the backend logic should be shared with the client code. So, in this experiment I have created Actions and the ActionBus to encapsulate everything.
This is the login action.
Since the first time you must have connection, I'm requesting a sync payload in order to instantiate my local database (realm / mobx models)
This approach supports a "fake" login to the local database too.