- SDK Version: 36.0.0
- Platforms(Android/iOS/web/all): Android/iOS
I’ve been trying out the expo-sqlite library today, and I’ve run into a frustrating wall trying to use it. I wanted to create a migration system, so I want to write some functions outside of React components. However, due to the callback-based API, I can’t find a way to get data out of the ResultSets other than in a React component, like in the example app where it uses useState and useEffect hooks. I would like to be able to chain async/await functions like many other Expo SDK APIs. This would allow me to do things like write an async lastMigration
function that can return data other functions can use, and would make my code much, much more testable.
I’m not a very experienced JS programmer, so if I’m missing an option, please advise. Thanks.