@cisdi/data-provider

3.0.2 • Public • Published

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 URL
  • interval: time interval
  • sourceName: source key from dataSource, support chain, ex: data.items
  • propsName: props key of child props, support chain, ex: chart.data
  • params: http request params, treated as search in GET and body in POST
  • headers: http request headers
  • normalize: normalize http request data, default is (data: any) => data

Develop

npm install
npm run build

Readme

Keywords

Package Sidebar

Install

npm i @cisdi/data-provider

Weekly Downloads

3

Version

3.0.2

License

MIT

Unpacked Size

49.6 kB

Total Files

10

Last publish

Collaborators

  • cisdi017217