Check out example codes for "sqlite.create "capacitor" cannot read property 'then' of undefined". It will help you in understanding the concepts better.

Code Example 1

// note: This code needs to be run on a device, not in a PC browser.
// if you
let connection = this.sqlite.create({
	name: 'cards.db',
	location: 'default'

// se a conexão for válida
	connection.then((db: SQLiteObject) => {})

Learn ReactJs, React Native from