# @plasmicapp/query

> Isomorphic, component-level data fetching for React, built on SWR, with server-side prefetching.

Latest version **0.1.88** (published 2026-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @plasmicapp/query
pnpm add @plasmicapp/query
yarn add @plasmicapp/query
bun add @plasmicapp/query
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.1.88 |
| Published | 2026-09-09 |
| First published | 2021-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 1 |
| Unpacked size | 48.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7041 |
| Author | Chung Wu |
| Maintainers | plasmicapp |

## Links

- npm: https://www.npmjs.com/package/@plasmicapp/query
- Repository: https://github.com/plasmicapp/plasmic
- Homepage: https://www.plasmic.app
- Issues: https://github.com/plasmicapp/plasmic/issues
- npm.io page: https://npm.io/package/@plasmicapp/query

## Dependencies (1)

- [swr](https://npm.io/package/swr.md) ^1.3.0

## Recent versions

- 0.1.88 (latest) — 2026-09-09
- 0.1.87 — 2026-07-30
- 0.1.86 — 2026-06-29
- 0.1.85 — 2026-06-26
- 0.1.84 — 2026-03-22
- 0.1.83 — 2026-02-10
- 0.1.82 — 2026-01-14
- 0.1.81 — 2025-10-16
- 0.1.80 — 2025-08-08
- 0.1.79 — 2024-04-30
- 0.1.78 — 2024-01-29
- 0.1.77 — 2023-11-10
- 0.1.76 — 2023-11-08
- 0.1.75 — 2023-11-01
- 0.1.74 — 2023-10-13
- … 67 more at https://npm.io/package/@plasmicapp/query/versions

## README

# @plasmicapp/query

## Purpose

This is a mini, isomorphic, _component-level_ data-fetching library, built around [swr](https://github.com/vercel/swr).
It lets you fetch data in a React environment client-side or server-side.
On the server, it lets you prefetch data from any component, Suspense-style.

Normally in frameworks like Next.js pages router, you cannot couple your data fetches with your components--you need to fetch at the page-level with `getStaticProps`/`getServerSideProps`.
Component-level fetches would happen client-side instead of server-side (ultimately via a `useEffect` or similar).

Paired with @plasmicapp/prepass, this library allows you to express data fetches directly in your components while prefetching all data on the server-side.

## Usage with Plasmic

Learn more about how this can be used with Plasmic specifically in the docs: https://docs.plasmic.app/learn/data-code-components/.

## Notes

- This library is NOT for React Server Components, only for server rendering environments like Next.js pages router.
- This library is NOT specific to Plasmic in any way.

---
_Source: https://npm.io/package/@plasmicapp/query · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
