1.0.1 • Published 8 years ago
react-with-async-state v1.0.1
React withAsyncState()
A React high-order Component designed to abstract the fetch, wait, check flow of remote or asynchronous requests or Redux Thunk actions. The goal is to make it a drop in component that connects to the store, rendering the TargetComponent
only when the state is in shape.
Install
$ npm install react-with-async-state --save
API
withAsyncState( Component, Wait, Error, Function )
Usage
export default connect(
mapStateToProps,
mapDispatchToProps
)(
withAsyncState(
AComponentThatNeedsSomethingBeforeRendering,
Loader,
ErrorMessage,
(props) => !!_.size(props.items)
)
);
1.0.1
8 years ago
1.0.0
8 years ago
1.0.0-beta6
8 years ago
1.0.0-beta5
8 years ago
1.0.0-beta4
8 years ago
1.0.0-beta3
8 years ago
1.0.0-beta2
8 years ago