knox ревизій цього gist . До ревизії
1 file changed, 14 insertions
React-admin-readme-2.jsx(файл створено)
@@ -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 | + | ); |
Новіше
Пізніше