-
-
Notifications
You must be signed in to change notification settings - Fork 49
Provide doc about integrating in bigger projects #28
Comments
I'd love to know how to write unit tests! |
Hi, I am interested in first two rows. Also, I have a question. How can I use vuexfire with strict mode? |
Strict mode is supported on v2. for the v1 it needs a mutation to call the function here instead of directly calling the function |
@posva How stable is v2 for production use? |
The internals are stable, it's really simple after all. The API will change in the future to make things easier, but we're still discussing the changes needed to Vuex to make that possible. If you use it today, you'll have to compile it by yourself and when the stable version is released, adapt to the API, which should be easy. Also, there're no docs other than the examples and unit tests. But it's really easy 🙂 , other people got it working already |
Is vuexfire compatible with vue-router? I'm trying to use it with vue-router and have an issue. I load an array from firebase with 'db.ref('listOfObjects')' which I use tie up with the component firebase property and mapGetters. Everything works fine, adding items to firebase with push also works. But if I navigate to another component using the a db.ref to the same source and then push an item to the db, the local collection gets the item added twice, but only in the local state and not in the firebase db. Is this a bug, me doing it wrong or simply vuexfire not compatible with vue-router? |
It works fine in my experience. Not sure what issue you're experiencing specifically but check out Vuex router sync if you haven't already. |
Of course 😄 If you have two items added you probably bound a ref twice, but who knows, it may be a bug. In that case, boil down the issue in a jsfiddle and create a new issue 🙂 |
I've tried to make sure the refs only binds once as I suspected it. Then I've also wrapped |
An example using vuex, vue-router, keep-alive and a |
@Tim86 The Where to bind ref examples will probably clear things out for you |
@posva I've been hacking on the new version a bit with no issues. Love the new bind methods. 👍 More examples of where to bind would be great. In particular, an example that shows how to bind based on some state data or maybe a URL parameter. I would definitely like to hear if there are best practices or recommended patterns for reference storage and maybe dereferencing. |
Thanks for the feedback @chrisbraddock ! Happy to see you're using it fine! I'll note that. I'll have to create a full doc, not just the readme so it scale better. |
Sorry, I guess I meant when (and how) to bind vs. strictly "where" as in when in the Vue lifecycle, and how, given perhaps a reference that requires an id from route or other context. I was trying to think in terms of the common real world issues I've hit the times I've integrated VuexFire. For my references, I ended up with a simple object scoped to store (I'm not using modules yet), so it sounds like that's within reason. ;) Thanks! |
Hello everyone 👋 Is this still being worked on? I am new to Vuexfire, and currently trying to migrate an existing app from |
Moved to vuejs/vuefire#145 |
As seen in #5 and other requests, it'll be great to get further guidance and best practices about how to use firebase with vuexfire
Feel free to share your thoughts on this about what you'll like to see
The text was updated successfully, but these errors were encountered: