use-numeric-value

Better state management for number inputs

Usage no npm install needed!

<script type="module">
  import useNumericValue from 'https://cdn.skypack.dev/use-numeric-value';
</script>

README

use-numeric-value

NPM version NPM downloads NPM license Codecov Travis Bundle size

About

Better state management for number inputs

Demo

Playground – play with library in CodeSandbox

How to Install

First, install the library in your project by npm:

$ npm install use-numeric-value

Or Yarn:

$ yarn add use-numeric-value

Getting Started

• Import hook in React application file:

import { useNumeric } from 'use-numeric-value';

Returned Values

Example

import React from 'react';
import { useNumeric } from 'use-numeric-value';

const App = () => {
  const [value, setValue] = useNumeric();

  return (
    <input type="number" value={value} onChange={} />
  )
}

License

This project is licensed under the MIT License © 2021-present Jakub Biesiada