@blitzjs/rpc
v2.1.1
Published
[![Blitz.js](https://raw.githubusercontent.com/blitz-js/art/master/github-cover-photo.png)](https://blitzjs.com)
Downloads
16,983
Keywords
Readme
Documentation Link
GitHub Link
Quick Start
Install Blitz RPC
`npm i @blitzjs/rpc`
# yarn add @blitzjs/rpc
# pnpm add @blitzjs/rpc
You can alternatively use npx
Overview
Blitz "Zero-API" data layer (Blitz RPC) is focused on making the communication between server and client seamless. It lets you
import server code directly into your components instead of having to manually add API endpoints and do client-side fetching and caching. Here's a quick overview:
Queries and mutations
Queries and mutations only run on the server — at build time, the direct function import is replaced with an RPC network call. So the query function code is never included in your client code. It's instead moved to an API layer.
Framework Support
Currently Blitz RPC is only supported in Next.js. We are working on adding support for other frameworks.