mesqueeb/vuex-easy-firestore
소개
Easy coupling of firestore and a vuex module. 2-way sync with 0 boilerplate!
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalVuex Easy Firestore 🔥
In just 4 lines of code, get your vuex module in complete 2-way sync with firestore:
const userModule = {
firestorePath: 'users/{userId}/data',
firestoreRefType: 'collection', // or 'doc'
moduleName: 'user',
statePropName: 'docs',
// the rest of your module here
}
// add userModule as vuex plugin wrapped in vuex-easy-firestore
and Alakazam! Now you have a vuex module called user with state: {docs: {}}.
All firestore documents in your collection will be added with the doc's id as key inside docs in your state.
Now you just update and add docs with dispatch('user/set', newItem) and forget about the rest!
Other features include hooks, fillables (limit props to sync), default values (add props on sync), a fetch function and much more...
Motivation
I didn't like writing an entire an API wrapper from scratch for firestore every single project. If only a vuex module could be in perfect sync with firestore without having to code all the boilerplate yourself...
And that's how Vuex Easy Firestore was born.
Documentation
See the all new documentation made with VuePress!
Support
If you like what I built, you can say thanks by buying me a coffee! :)
Thank you so much!! Every little bit helps.
관련 프로젝트 살펴보기
불러오는 중…
