UNPKG

@fakel/rest-admin

Version:

An application that makes it easier to work with your API

48 lines (35 loc) 802 B
# React Admin (beta) An application that makes it easier to work with your API [See documantation](https://ra.fakel.com.ua/) ## Installation Using npm: ``` $ npm i @fakel/rest-admin ``` Using yarn: ``` $ yarn add @fakel/rest-admin ``` ## Usage Create a React app, for example with [create-react-app](https://github.com/facebook/create-react-app), in your root component add the following code: ``` import React from 'react'; const dataProvider = createSimpleRest({ apiBaseUrl: 'http://localhost:3000' }); const App = () => { return ( <Admin dataProvider={dataProvider} > <Resource name="posts" list={PostsView} edit={PostEdit} create={PostsCreate} options={{ label: 'Posts', }} /> </Admin> ) } ```