Skip to main content
Glama

@arizeai/phoenix-mcp

Official
by Arize-ai
useInterval.ts736 B
import { useEffect, useRef } from "react"; type Callback = () => void; /** * Custom hook to use setInterval with React hooks * @param callback * @param {number | null} delay - if set to null, no interval will be set */ export function useInterval(callback: Callback, delay: number | null) { const savedCallback = useRef<Callback | null>(null); // Remember the latest callback. useEffect(() => { savedCallback.current = callback; }, [callback]); // Set up the interval. useEffect(() => { function tick() { savedCallback.current && savedCallback.current(); } if (typeof delay === "number") { const id = setInterval(tick, delay); return () => clearInterval(id); } }, [delay]); }

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/Arize-ai/phoenix'

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