HTTP client component for React with child function callback to create async requests in render based on Axios.
Yarn:
npm:
import React from 'react'; import Request from 'axios-react'; const Demo = () => ( <Request config={{ method: 'get', url: 'https://jsonplaceholder.typicode.com/todos/1', }} > {({ loading, response, error, refetch, networkStatus }) => ( <div> {networkStatus && <span>{networkStatus}</span>} {loading && <span>Loading...</span>} {error && <span>{error.response.data}</span>} {response && <h3>{response.data.title}</h3>} <button onClick={refetch}>Refetch!</button> </div> )} </Request> );
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4