knox revisó este gist . Ir a la revisión
1 file changed, 14 insertions
React-admin-readme-2.jsx(archivo creado)
@@ -0,0 +1,14 @@ | |||
1 | + | // in app.js | |
2 | + | import * as React from "react"; | |
3 | + | import { render } from 'react-dom'; | |
4 | + | import { Admin, Resource } from 'react-admin'; | |
5 | + | import restProvider from 'ra-data-simple-rest'; | |
6 | + | ||
7 | + | import { PostList, PostEdit, PostCreate, PostIcon } from './posts'; | |
8 | + | ||
9 | + | render( | |
10 | + | <Admin dataProvider={restProvider('http://localhost:3000')}> | |
11 | + | <Resource name="posts" list={PostList} edit={PostEdit} create={PostCreate} icon={PostIcon} /> | |
12 | + | </Admin>, | |
13 | + | document.getElementById('root') | |
14 | + | ); |
Siguiente
Anterior