-
Notifications
You must be signed in to change notification settings - Fork 37
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
Bundle initial database within the app #488
Comments
Are you referring to a React Native app here? In theory it is possible - you can export a database, bundle it with your application, then copy it to writable storage when the app opens the first time. However, there are some trade-offs with this approach, so it would help to know more about your use case and what you want to achieve with bundling the database. For example, do you want your app to be able to load offline on the first launch, do you want it to load faster, or reduce data transfer for the initial sync? And is the set of data that you want to pre-load fairly static, or do you expect it to change often? One specific caveat is that if you make any sync rule changes after the initial export was created, users will need to re-sync all data, so then the bundled database won't help other than having some data available immediately on the first load. Our Discord server may be a better place to discuss the options and trade-offs for this. |
Hi @rkistner, yes this is about React Native app, sorry for not mentioning earlier. I'd like to have some guidance / docs on how to achieve that. |
I want to eliminate initial sync as much as possible and provide initial DB with all the data already in there. I guess since powersync is local first it should support that? Is it possible?
The text was updated successfully, but these errors were encountered: