sheaivey / react-axios

Axios Components for React with child function callback
MIT License
180 stars 20 forks source link

Ability to reload data without changing url or `isReady` #21

Closed acc15 closed 6 years ago

acc15 commented 7 years ago

Can u please consider adding such feature?

Use cases:

Example of usage:

<Get url="/user">{ (error, resp, isLoading, reload) => 
    error ? <div>Oops... <button onClick={ () => reload() }>Retry</button></div> : ...other cases 
}</Get>
sheaivey commented 6 years ago

v2.0.0 now has a child property called onReload which is a function that can accept new props in case you want to let the server know that the user invoked the request by onReload.

see the example for more details. https://github.com/sheaivey/react-axios#example