Comments (6)
I could see that working really well, and best of all would be framework agnostic. This kind of client-side caching seems almost like an absolute necessity when pulling information to build the state of an app, when the network can be slow or unavailable.
from reactfire.
Thanks for opening this issue! I'm a bit overwhelmed with other things at the moment, so give me a few days to process this and respond in full. I just wanted to let you know that I read it and am not ignoring it.
FYI, the original source code is just in a single file here. Local setup instructions are here.
from reactfire.
I think that this is an excellent idea for app resiliency (especially given the promising feature-set of GunJS!), but that if it were to exist, it should probably exist within the Firebase binding and not in ReactFire as in theory it could work without any knowledge of an implementing client.
from reactfire.
@antoligy it could be a wrapper or a plugin, like firebaseResillent = new FirebaseResillent(firebase) or something the like; where you modify the main object.
from reactfire.
@antoligy maybe we should probably bring this to the actual firebase project; rather than reactfire since that, as you say, it doesn't have to be just about ReactFire.
I'd just be more complex that way, and I don't think I could develop that on my own (considering work).
Maybe a generic wrapper would be nice, where you can say which functions do what; and make it external from firebase so that it can work with other libraries as well that use this JSON model.
from reactfire.
Hey there, thanks for the discussion so far. I agree that this seems like more of a thing that belongs in the core Firebase SDK, not ReactFire. Unfortunately, the core Firebase SDK is not yet open sourced, so for now, you'd have to build a wrapper around the SDK which has this behavior. Note that we have longterm plans to bring true offline persistence to the JavaScript SDK like we have with the mobile SDKs, but it is still a good deal off.
Marking as "invalid" just because this isn't the right place to introduce this kind of behavior. I definitely would love to see you make something like this, but I think it should live independent of ReactFire.
Let me know if you've got questions.
from reactfire.
Related Issues (20)
- useDatabaseListData only fetch data once HOT 3
- Repo no longer maintained 💀 HOT 1
- useStorageDownloadURL crashes when there is no file in firebase storage HOT 4
- cannot handle error from useFirestoreCollectionData HOT 8
- High CPU usage with constant GC with `useInitFirestore` HOT 1
- How to set new doc in firestore HOT 3
- How implement appcheck in reactfire v3? HOT 2
- useSigninCheckResult.signedIn always false for email on iOS app but true on web HOT 1
- Typo in official Firebase Documentation HOT 1
- Failed to import FirebaseAppProvider for reactfire@^4.2.2
- useFirestoreCollectionData infinite loop when using a Query withConvertor HOT 2
- 403 on storage request HOT 2
- StackBlitz live demo not working (locally too)
- v4.2.3 is not published on npm HOT 6
- how to trigger parent re-render when using `remove` in realtime database? HOT 2
- Random permission errors when logging in with multiple tabs open
- Type of `ObservableStatus::data` should include `undefined` HOT 1
- Disable Analytics HOT 1
- useUser() returns undefined unexpectedly on initial render HOT 5
- Support for Firebase 10.1.0 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactfire.