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
Can't use Dexie in react-native #1473
Comments
I am also getting the same issue on React-Native(version 0.67). |
The problem is in the incomplete condition: Dexie.js/src/live-query/enable-broadcast.ts Lines 26 to 63 in ad18b19
react-native has a navigator and self properties but no addEventListener function.
Thus, it is necessary to add additional checks on Dexie.js/src/live-query/propagate-locally.ts Lines 5 to 22 in 1c5576e
For example: } else if (
typeof self !== 'undefined' &&
typeof navigator !== 'undefined' &&
typeof addEventListener !== 'undefined'
) { |
I am trying to use a library in react-native which depends on Dexie. By using
indexededdbshim
I intend to havereact-native-sqlite-2
as backend instead of IndexedDB.Independently of the use of the
indexeddbshim
strategy, I see this error:ReferenceError: Can't find variable: addEventListener
Any clue on how to solve it?
The text was updated successfully, but these errors were encountered: