1.2.1 • Published 2 years ago
use-reduce v1.2.1
use-reduce
The easiest way to use reduce function
Install
npm install --save use-reduce
Usage
import * as React from 'react'
import { useAddAllElements, useMultiplyAllElements } from 'use-reduce'
const Example = () => {
const example = useAddAllElements([1,2,3,4,5])
return (
<div>
{example} // 15
</div>
)
}
License
MIT © justin-the-developer
This hook is created using create-react-hook.