@snapwp/plugin-tanstack-query
v0.1.0
Published
TanStack Query integration for SnapWP.
Keywords
Readme
@snapwp/plugin-tanstack-query
TanStack Query adapter for SnapWP.
This package is a wrapper around the TanStack Query library, allowing you to use TanStack Query as the underlying Query Engine for data fetching within the SnapWP ecosystem.
[!WARNING] 🐉 There be dragons! This project is in active development and considered experimental. Some features may be incomplete, unstable, or subject to change.
Installation
Add the package to your SnapWP project's dependencies:
npm install @snapwp/plugin-tanstack-query --saveIf you wish to use TanStack Query directly, you should also install the core TanStack Query package:
npm install @snapwp/plugin-tanstack-query @tanstack/react-query --saveUpdate your snapwp.config.ts file to use the
TanStackQueryEngine:import type { SnapWPConfig } from '@snapwp/core/config'; + import { TanStackQueryEngine } from '@snapwp/plugin-tanstack-query'; const config: SnapWPConfig = { // The rest of your SnapWP config... query: { + engine: TanStackQueryEngine, }, }; export default config;
Contributing
This package is part of SnapWP's monorepo and is actively maintained by rtCamp. Packages are published to npm from the packages directory, and can be used standalone in the headless WordPress ecosystem or as part of SnapWP's framework.
Contributions are welcome and encouraged! To learn more about contributing to this package or SnapWP as a whole, please read the Contributing Guide.
For development guidelines, please refer to our Development Guide.
