How to bootstrap/deploy SQLite DB during app install/update?

I am new to mobile or react-native app development and hence new to Expo too.

I use Expo SDK 33.0.0 and expo-sqlite@5.0. and have successfully used the sqlite module to do the following:

  1. Copy/replace my own .db file(with tables and content) to ‘${FileSystem.documentDirectory}SQLite/’ location.
  2. Query the contents of the tables.

I need to perform the step No. 1 above, at the time of app install/update and not during application restart/load. Currently I do the above in the componentDidMount() of my ‘App.js’.

Can someone who has done already this help me out with the same?

Thanks in advance.


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.