react admin with api code example
Example 1: react admin data provider
dataProvider
.getOne('posts', { id: 123 })
.then(response => {
console.log(response.data);
});
Example 2: react admin
import * as React from "react";
import { Admin, Resource } from 'react-admin';
import simpleRestProvider from 'ra-data-simple-rest';
import { PostList } from './posts';
const App = () => (
<Admin dataProvider={simpleRestProvider('http://path.to.my.api')}>
<Resource name="posts" list={PostList} />
</Admin>
);
export default App;