Skip to main content
Glama
useLoadDynamic.ts420 B
import react from 'react'; export const useLoadDynamic = <T>(_key: string, promise: Promise<T>): T => { /** @ts-ignore remove error Property 'cache' does not exist on type 'typeof React'. */ const cachedPromise = react.cache(async () => await promise)(); /** @ts-ignore remove error Property 'use' does not exist on type 'typeof React'. */ const dictionary = react.use(cachedPromise); return dictionary; };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aymericzip/intlayer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server