Context7 MCP Server for Zed MCP Server #204
Replies: 1 comment
-
I have tried installing the latest context7 extension in zed but it still doesn't seem to work, for example I use this prompt prompt: How do I invalidate a query in React Query? use context7 1. Standard Approach (using useQueryClient hook):import { useQueryClient } from '@tanstack/react-query';
function MyComponent() {
const queryClient = useQueryClient();
const handleInvalidate = () => {
// Invalidate specific query
queryClient.invalidateQueries({ queryKey: ['todos'] });
// Or invalidate multiple queries with a prefix
queryClient.invalidateQueries({ queryKey: ['posts'] });
};
return <button onClick={handleInvalidate}>Invalidate Query</button>;
} 2. If Using a Custom Context (e.g., "context7"):If you're using a custom context that provides the query client: import { useContext } from 'react';
import { QueryClient } from '@tanstack/react-query';
import Context7 from './your-context-file'; // Your custom context
function MyComponent() {
const { queryClient } = useContext(Context7);
const handleInvalidate = () => {
queryClient.invalidateQueries({ queryKey: ['todos'] });
};
return <button onClick={handleInvalidate}>Invalidate Query</button>;
} Key Points:
If "context7" was a Typo:If you meant Remember to ensure your component is wrapped in a please provide a more complete guide in the documentation |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Context7 MCP Server for Zed MCP Server
Context7 MCP Server for Zed
https://mcp.so/server/zed-mcp-server-context7/akbxr?tab=comments
Beta Was this translation helpful? Give feedback.
All reactions