Comments (6)
@gootyfer Hi Israel, have you found a solution for this?
I have not, after a day of searching and trying.
Nope, as far as I remember :) @dizid
from vuefire.
I may be missing something in Firebase but I don't think it's possible natively in Vuefire.
However, you can use the once
listener on the ref to get the whole array, then in a watch, check if the array is the same as in your component (checking the present keys are the same is enough)
IMO you shouldn't rely on having the whole data in your vue object. It should be easy to manage an incomplete array state with Vue
Cheers!
from vuefire.
Thanks for the answer. I re-phrase my question since I didn't explained myself well.
- I'm binding an object (not array this case) using
app.$bindAsObject('profile', profileRef);
- I want to access
app.profile.courses
but it's not immediately accesible but when the object is filled with the server data. Can I do something likeapp.$bind().then()
instead of retrieving the data manually withonce
?
Thank you, Eduardo!
from vuefire.
Can I do something like app.$bind().then() instead of retrieving the data manually with once?
This is something I was thinking of implementing, at least for objects. But its purpose was to make SSR possible. I'm not sure if the once
callback ensure that the data is available on the Vue instance. My advice would be to make it fault tolerant. eg: wrap the profile in a component and use a v-if
to display it, passing down the profile as a prop. You can also display a fallback content with v-else
With this you can also implement some kind of timeout behaviour in the default component to display an error message like "no internet connection"
from vuefire.
@gootyfer Hi Israel, have you found a solution for this?
I have not, after a day of searching and trying.
from vuefire.
from vuefire.
Related Issues (20)
- Firebase Auth tree shaking HOT 3
- GOOGLE_APPLICATION_CREDENTIAL alternative for monorepos HOT 8
- Make vue-fire compatible with Ionic ? HOT 10
- Broken: "firebase.json" file doesn't exist + import issue HOT 5
- documentation error HOT 1
- id field value is override by vuefire HOT 3
- typescript type definition not consistence: useDocument return null reference if document does not exist HOT 1
- Error when installing v3.1.20. - simple-git-hooks not recognized as a command HOT 6
- `databaseDefaultSerializer` exported incorrecly HOT 1
- Use multiple firestore databases HOT 1
- When using withConverter on collection it do not fetch inner refs
- returned values from `useDocument` and `useCollection` using a getter aren't reactive HOT 1
- `toFirestore` inside `globalFirestoreOptions.converter` is never called HOT 1
- Detect nested refs in custom classes
- ssrKey: false not working in useDocument HOT 1
- First SSR call to useDocument fails but refresh and second call works HOT 5
- Currently you are not able to use auth module without a service account
- Readonly `id` field is undefined by default (despite filled other data)
- Support Multi tenancy HOT 2
- Customize cookie minting auth endpoint path
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 vuefire.