/** * @license * Copyright Stbui All Rights Reserved. * https://github.com/stbui/prophet */ /// /** * * @param Component * * @example * * import React, { Component } from 'react'; * import { withDataProvider, showNotification } from '@stbui/prophet-core'; * * class UserList extends Component { * state = { * users: [], * }; * * componentDidMount() { * const { dataProvider, dispatch } = this.props; * dataProvider('GET_LIST', 'users', { filter: { username: 'stbui' } }) * .then(({ data: users }) => this.setState({ users })) * .catch(error => dispatch(showNotification('error', error.message))); * } * * render() { * const { users } = this.state; * * return ( * * {users.map((user, key) => ( * * ))} * * ); * } * } * * export default withDataProvider(UserList); */ declare const withDataProvider: (Component: any) => (props: any) => JSX.Element; export default withDataProvider;