@cisdi/data-provider
v3.0.2
Published
data provider for react component
Downloads
25
Readme
DataProvider
DataProvider for UI Engine Components
Install
npm install @cisdi/data-provider
Usage
import DataProvider from '@cisdi/data-provider'
const Demo = () => (
<DataProvider dataSource="https://example.com/" interval={1000}>
<Test />
</DataProvider>
)
Props
dataSource
: it can be original data or URLinterval
: time intervalsourceName
: source key fromdataSource
, support chain, ex:data.items
propsName
: props key of child props, support chain, ex:chart.data
params
: http request params, treated assearch
inGET
andbody
inPOST
headers
: http request headersnormalize
: normalize http request data, default is(data: any) => data
Develop
npm install
npm run build