https://github.com/jdelucaa/hooks-library
React custom hooks library
https://github.com/jdelucaa/hooks-library
Last synced: 3 months ago
JSON representation
React custom hooks library
- Host: GitHub
- URL: https://github.com/jdelucaa/hooks-library
- Owner: jdelucaa
- License: mit
- Created: 2019-10-06T19:29:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T08:25:41.000Z (over 2 years ago)
- Last Synced: 2025-03-28T07:11:27.921Z (4 months ago)
- Language: JavaScript
- Size: 1.83 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hooks-library
> React Hooks Library
[](https://www.npmjs.com/package/hooks-library)
## Install
```bash
npm install --save hooks-library
```### Available hooks
[useAxiosGet](#useAxiosGet)
[useBreakpoint](#useBreakpoint)
[useFormInput](#useFormInput)### `useAxiosGet`
```jsx
import React, { Component } from 'react';
import { useAxiosGet } from 'hooks-library';const Example = () => {
const [{ data, isLoading, isError }] = useAxiosGet('url');return (
{isError &&Something went wrong...}
{isLoading ?Loading...:{data}}
);
};
```### `useBreakpoint`
```jsx
import React, { Component } from 'react';
import { useBreakpoint } from 'hooks-library';const Example = () => {
const brkPnt = useBreakpoint();return
{brkPnt};
};
```### `useFormInput`
```jsx
import React, { Component } from 'react';
import { useFormInput } from 'hooks-library';const Example = () => {
const value = useFormInput();return (
);
};
```## License
MIT © [jdelucaa](https://github.com/jdelucaa)