{"library":"ra-data-json-server","title":"React-Admin JSON Server Data Provider","description":"ra-data-json-server is a data provider specifically designed to integrate `react-admin` applications with REST APIs that follow the conventions of JSON Server, including services like JSONPlaceholder. It translates `react-admin` data requests (e.g., `getList`, `getOne`, `create`) into standard HTTP requests compatible with a JSON Server backend. The package is currently at version 5.14.5 and is actively maintained, with frequent patch releases addressing bug fixes and minor improvements, usually on a weekly or bi-weekly basis, following the `react-admin` release cycle. A key differentiator is its strict adherence to JSON Server's REST dialect, simplifying setup for prototyping or light backend needs, and requiring specific HTTP headers like `X-Total-Count` for proper pagination.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install ra-data-json-server"],"cli":null},"imports":["import jsonServerProvider from 'ra-data-json-server';","import jsonServerProvider from 'ra-data-json-server';","import { fetchUtils } from 'react-admin';\nconst httpClient = (url, options = {}) => { /* ... */ return fetchUtils.fetchJson(url, options); };\nconst dataProvider = jsonServerProvider('url', httpClient);"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import * as React from 'react';\nimport { Admin, Resource } from 'react-admin';\nimport jsonServerProvider from 'ra-data-json-server';\n\n// For demonstration purposes, we'll use a simple list component.\n// In a real app, you'd define your own PostList.\nconst PostList = () => <div>Posts List (render your actual list here)</div>;\n\nconst App = () => (\n    <Admin dataProvider={jsonServerProvider('https://jsonplaceholder.typicode.com')}>\n        <Resource name=\"posts\" list={PostList} />\n        <Resource name=\"users\" list={PostList} />\n    </Admin>\n);\n\nexport default App;\n","lang":"typescript","description":"Initializes a `react-admin` application with `ra-data-json-server` connected to JSONPlaceholder, defining 'posts' and 'users' resources.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}