-
react-admin 메모 : AdminFront-end/React.js 2020. 3. 2. 17:56
https://marmelab.com/react-admin/Admin.html
const App = () => ( <Admin dataProvider={simpleRestProvider('http://path.to.my.api')}> <Resource name="posts" list={PostList} /> </Admin> );
props
- dataProvider
- title
- dashboard
- catchAll
- menu
- theme
- layout
- customReducers
- customSagas
- customRoutes
- authProvider
- loginPage
- logoutButton
- initialState
- history
- Internationalization
- Declaring resources at runtime
- Using react-admin without <Admin> and <Resource>
data provider : required prop
- object여야 하고 다음과 같은 메소드를 리턴해야 함.
- 커스텀 http 헤더와 auth 부분을 추가하기 좋은 부분
const dataProvider = { getList: (resource, params) => Promise, getOne: (resource, params) => Promise, getMany: (resource, params) => Promise, getManyReference: (resource, params) => Promise, create: (resource, params) => Promise, update: (resource, params) => Promise, updateMany: (resource, params) => Promise, delete: (resource, params) => Promise, deleteMany: (resource, params) => Promise, }
title
- 에러페이지의 헤더
dashboard
- object여야 하고 다음과 같은 메소드를 리턴해야 함.
'Front-end > React.js' 카테고리의 다른 글
react-admin : <Resource> component (0) 2020.03.04 react-admin : Field Components (0) 2020.03.03 react-admin 메모 : data provider (0) 2020.03.02 [React document] tutorial : Adding Time Travel (0) 2020.02.17 [React document] tutorial : Completing the game (0) 2020.02.16