Skip to main content
Glama
useGetElementById.ts371 B
'use client'; import { useEffect, useState } from 'react'; export const useGetElementById = (id: string) => { const [element, setElement] = useState<HTMLElement | undefined | null>( undefined ); // This useEffect avoids the error of not finding the container useEffect(() => { setElement(document.getElementById(id)); }, [id]); return element; };

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