ra-ror-jsonapi-client
Version:
Rails JSON API REST Client for react-admin
38 lines (26 loc) • 761 B
Markdown
for react-admin that allows for rapidly building admin interfaces in React using the RA framework.
ra-ror-jsonapi-client is available from npm. You can install it (and its required dependencies)
using:
```sh
npm install ra-ror-jsonapi-client
```
It can also be installed using yarn:
```sh
yarn add ra-ror-jsonapi-client
```
## Usage
```js
//in app.js
import React from "react";
import { Admin, Resource } from "react-admin";
import dataProvider from "ra-ror-jsonapi-client/build/restClient";
const restClient = jsonAPIRestClient("http://localhost:3000");
const App = () => (
<Admin dataProvider={dataProvider}>
...
</Admin>
);
export default App;
```
A JSONAPI compatible adapter