-
Notifications
You must be signed in to change notification settings - Fork 518
Open
Description
There seems to be an issue that prevents sqlite databse from opening when calling SQLite.openDatabase
on windows platform
here's the code
import * as React from 'react';
import SQLite from 'react-native-sqlite-storage';
export default function useSqlit() {
const [isOpen, setIsOpen] = React.useState(false)
React.useEffect(() => {
try {
SQLite.openDatabase({ name: "my.db", location: "default" },
() => {
setIsOpen(true);
}, () => {
// database did not open
});
} catch (error) {
console.log("err: ", error.message)
}
});
return isOpen;
}
Expected Behavior
calling SQLite.openDatabase
should open database without errors, so that sql transactions can be executed
Current Behavior
calling SQLite.openDatabase
would throw an error that says Cannot read properties of undefined (reading 'open')
Your Environment
"react": "17.0.1",
"react-native": "0.64.2",
"react-native-windows": "^0.64.14",
"react-native-sqlite-storage": "^5.0.0",
Debug logs
Cannot read properties of undefined (reading 'open')
kosick
Metadata
Metadata
Assignees
Labels
No labels