rocicorp / replicache

Realtime Sync for Any Backend Stack
https://doc.replicache.dev
1.01k stars 37 forks source link

dropAllDatabases does not respect experimentalCreateKVStore #1057

Closed NavaceSystem closed 1 week ago

NavaceSystem commented 2 months ago
"replicache": "14.2.2",

We are trying to use replicache in react-native using the experimentalCreateKVStore with https://github.com/Braden1996/react-native-replicache binding. Everything works fine except for the the dropAllDatabases and dropDatabase calls. It seems to be ignoring the binding and doing its default "web" stuff. I've traced the minified Replicache code to debug this and below are 2 errors that made me reach this conclusion:

aboodman commented 2 months ago

I think this is fixed in Replicache 15. We started releasing this and didn't complete it. I can't remember why. Can you take a look?

1kDustin commented 2 months ago

@NavaceSystem This does seem to work in react native on Replicache 15, but Replicache seems to continue to try and sync once the DB is destroyed. Calling replicache.close() before destroying the DB results in breaking destroyAllDatabases, so I think we're kind of stuck until this one gets figured out

aboodman commented 1 month ago

@1kDustin do you have a reproduction or test case that shows what you're seeing? Thanks!

aboodman commented 1 week ago

Oops, this was fixed.