ra-loopback-second
v1.1.3
Published
loopback style REST client for react-admin
Downloads
3
Readme
Loopback-style REST Client for react-admin
Loopback-style REST Client for react-admin, the frontend framework for building admin applications on top of REST services.
Prerequisite
- Your loopback server must response
X-Total-Count
header when querying list. Please use loopback3-xTotalCount on your server end.
How to use
yarn add ra-loopback-try
- On your
App.js
, add this:
import loopbackApiClient from 'ra-loopback-try';
...
<Admin restClient={loopbackApiClient('http://my.api.url/api')} ...>
- If you want this module handle authentication, add this:
import loopbackApiClient, {authClient} from 'ra-loopback-try';
...
<Admin restClient={loopbackApiClient('http://my.api.url/api')} authClient={authClient('http://my.api.url/api/users/login')} ...>
License
This module is licensed under the MIT Licence.