react-use-quicklink
Quicklink hook for React. Run quicklink in your React application using a simple hook and prefetch all your links.
Note: This is using the new React Hooks API Proposal which is subject to change until React 16.7 final.
You'll need to install
react
,react-dom
, etc at^16.7.0-alpha.0
Installation
Install using yarn
yarn add react-use-quicklink
Or using npm
npm install --save react-use-quicklink
Usage
Import it as use it inside any React function component.
; { ; // this is all you need return <UI />; // render some UI here with anchor tags to prefetch}
That's all, now it will run quicklink. Aditionally you can pass a custom configuration as an object to the useQuicklink
hook.
; { ; return <UI />;}