Map return from createServerData

return createServerData$(
async ([params]) => {
const collectionMap = new Map();
const data= await xxx;
for (const db of data.data) {
const collections = await xxx;
collectionMap.set(db.id, collections);
}
return {
data,
collectionMap,
};
},
{
key: () => [props.params],
},
);
return createServerData$(
async ([params]) => {
const collectionMap = new Map();
const data= await xxx;
for (const db of data.data) {
const collections = await xxx;
collectionMap.set(db.id, collections);
}
return {
data,
collectionMap,
};
},
{
key: () => [props.params],
},
);
collectionMap.get("id") cause server error: result(...)?.collectionMap.get is not a function I Cant return map from serverData?
2 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
colinshen
colinshenOP2y ago
Thanks. I dont know there is newer docs on github..
Want results from more Discord servers?
Add your server