Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jdelucaa/hooks-library
React custom hooks library
https://github.com/jdelucaa/hooks-library
Last synced: about 16 hours 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 (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T08:25:41.000Z (almost 2 years ago)
- Last Synced: 2024-09-01T00:22:20.660Z (3 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
[![NPM](https://img.shields.io/npm/v/hooks-library.svg)](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)