Table of Contents
- Zero dependencies
- Configurable
npm i use-scraper
⚠️ To use this component it is necessary to define a CORS-enabled proxy. For example you can use CORS-Anywhere.
import useScraper from "use-scraper"
const MyComponent = () => {
const { isLoading, data, error } = useScraper({
url: 'https://github.com/Alejandroid17',
proxyURL: '<proxy-url>'
});
return (
// This is an example, here you define your component.
<div>
{ isLoading && <div>Loading...</div> }
{ error && <div>{error}</div> }
{ data && <div>{data}</div> }
</div>
);
export default MyComponent;