TanStack Logo

Star

Get Component RPC Method

Returns JSX from the Worker with server-side fetched data (like React Server Components)

Rendered Component

🔥 Generated in Cloudflare Worker (Server-Side Only!)

This JSX was created in the Worker with data fetched server-side. The browser never made these requests!

🌐 Worker's Public IP Address

Fetched from api.ipify.org (server-side, no CORS!)

2a06:98c0:3600::103
🔐 Environment Variables Access

Found 1 environment variable(s):

MY_SECRET_SERVER_VARIABLE
is_this_the_real_life
⏰ Server-Side Timestamp
2025-12-15T02:19:56.031Z
  • ✅ Server-side fetch() calls (no CORS!)
  • ✅ Access to environment variables
  • ✅ Worker execution context
  • ✅ JSX serialization & deserialization

💡 Refresh the page to see new data! The browser never makes the external API call to ipify.org.

How It Works

✨ The component above was returned as pure JSX from the Cloudflare Worker with server-side data!

The worker fetches data from external APIs (ipify.org) server-side and reads environment variables — the browser never makes these requests! This demonstrates true worker-only functionality that cannot happen in the client.

Worker-Only Features Demonstrated:

  • Server-side fetch() calls without CORS restrictions
  • Access to environment variables (worker context only)
  • Worker execution context and metadata
  • JSX serialization & deserialization

🔥 Pro Tip: Open your browser's Network tab and refresh. You won't see any requests to ipify.org — it happens entirely in the worker!

← Back to RPC Methods