HTTP requests, the React way.
Disclaimer: The project currently is in its infancy. The APIs may or may not change. We are totally unsure if there are any cons to this approach. Checkout the Philosophy page, to get an idea why we created this package. If you disagree, we wanna listen 👂, or rather read 📖.
npm install react-requests
<Request
url='https://my-awesome-doma.in/me'
onSuccess={this.myAwesomeResponseHandler}
renderOnStart={() => {
return (
<MyAwesomeSpinner />
)
}}
renderOnSuccess={() => {
return (
<MyAwesomeContent />
)
}}
renderOnError={() => {
return (
<MyAwesomeErrorMessage />
)
}}
/>
Check out the Recipes page.
Any and all the contribution is welcome, providing it aligns with the interest of the project. Please make sure the commit messages follow the convention from the git commit template.