Map return from createServerData
collectionMap.get("id") cause server error:
result(...)?.collectionMap.get is not a functionI Cant return map from serverData?
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],
},
);result(...)?.collectionMap.get is not a functionresult(...)?.collectionMap.get is not a function