我可以使用 firestoreConnect 跨子集合查询吗?
Can I query across subcollections with firestoreConnect?
我了解到 Firestore 现在可以跨子集合查询。来自 react-redux-firebase 的 firestoreConnect HOC 是否能够利用此功能?
我也读到过。这里有关于如何执行子集合查询的信息:Link。我不确定 react-redux 但是,你的意图是什么?
收集组查询已于上周(2019 年 5 月 7 日)Google I/O 发布。快速扫描 react-redux-firebase
release notes shows no mention of them at this time, so it seems like they're not supported yet. You might want to file an issue/feature request for it 并监控所述发行说明的更新。
//To query all subcolections with react-redux-firebase useFirestoreConnect function, use:
useFirestoreConnect([
{
collectionGroup: "COLLECTION_GROUP_NAME",
storeAs: "ANY_NAME",
},
]);
//To Read and save to a variable
let YOUR_VAR = useSelector(
(state) => state.firestore.ordered.ANY_NAME
);
我了解到 Firestore 现在可以跨子集合查询。来自 react-redux-firebase 的 firestoreConnect HOC 是否能够利用此功能?
我也读到过。这里有关于如何执行子集合查询的信息:Link。我不确定 react-redux 但是,你的意图是什么?
收集组查询已于上周(2019 年 5 月 7 日)Google I/O 发布。快速扫描 react-redux-firebase
release notes shows no mention of them at this time, so it seems like they're not supported yet. You might want to file an issue/feature request for it 并监控所述发行说明的更新。
//To query all subcolections with react-redux-firebase useFirestoreConnect function, use:
useFirestoreConnect([
{
collectionGroup: "COLLECTION_GROUP_NAME",
storeAs: "ANY_NAME",
},
]);
//To Read and save to a variable
let YOUR_VAR = useSelector(
(state) => state.firestore.ordered.ANY_NAME
);