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],
        },
    );

collectionMap.get("id") cause server error:
result(...)?.collectionMap.get is not a function

I Cant return map from serverData?
Was this page helpful?