@query-api/react
Version:
Craft CMS Query Builder for React
69 lines (54 loc) • 2.58 kB
Markdown
<div align="center">
<a href="https://www.npmjs.com/package/@query-api/react" align="center">
<img src="https://online-images-sr.netlify.app/assets/react-craft-sdk.png" alt="Logo of Craft CMS and React">
</a>
<h1 align="center">@query-api/react</h1>
<p align="center">
Write Craft CMS Queries in React, like you would in Twig. 🚀🚀
</p>
<br />
</div>
<p align="center">
<a href="https://www.npmjs.com/package/@query-api/react">
<img src="https://img.shields.io/npm/v/%40query-api%2Freact?color=blue" alt="React Craft CMS latest version" />
</a>
<a href="https://www.npmjs.com/package/@query-api/react" rel="nofollow">
<img src="https://img.shields.io/npm/d18m/%40query-api%2Freact?color=blue" alt="React Craft CMS downloads">
</a>
<a href="https://www.npmjs.com/package/@query-api/react" rel="nofollow">
<img src="https://img.shields.io/npm/l/%40query-api%2Freact?color=blue" alt="React Craft CMS license">
</a>
</p>
## Install
```bash
npm install @query-api/react
```
> [!TIP]
>
> [Documentation](https://samuelreichor.at/libraries/query-api-react)
## Features
- **Query builder:** Easily build and execute queries directly from Next, enabling flexible,
real-time data retrieval from Craft CMS
- **Built in Helper Components:** Connect your data directly with your React components, to speed up
development.
- **Get Only the Data You Need:** Avoid overfetching by using a custom function in the query builder
to select only the fields you require.
- **Pretty Json:** Json Transformer are in place to prettify the response.
- **Support for Main Element Types:** Query addresses, assets, entries and users.
- **Full Typescript Suppport**: Craft Query Builder with typescript support pretty cool hah?😎
- **Multisite Helper Hooks**: Built in hooks and functions to support Craft Multisites with ease.
## Requirements
This plugin requires React and the
[Craft Query API](https://github.com/samuelreichor/craft-query-api) installed on your Craft CMS
instance.
## Documentation
Visit the [React SDK documentation](https://samuelreichor.at/libraries/query-api-react) for all
documentation, guides and developer resources.
## Further Resources
- [Craft CMS Plugin](https://samuelreichor.at/libraries/craft-query-api): The Craft CMS Plugin, that
powers this great stuff.
- [JS SDK](https://samuelreichor.at/libraries/js-craftcms-api): The core package of the query
builder.
## Support
If you encounter bugs or have feature requests, [please submit an issue](/../../issues/new). Your
feedback helps improve the library!