React Custom Hook Tutorial - Creating useOnline
, testing it and publishing it on NPM.
You can go through the tutorial here.
To compile the code for the use-online
hook run:
npm run build
To use the use-online
hook in example
, first run in the root directory of use-online
:
npm link
Then, inside example
run:
npm link use-online
Finally, run the development server:
npm start