use-reduce
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

use-reduce

The easiest way to use reduce function

NPM JavaScript Style Guide

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.

Readme

Keywords

none

Package Sidebar

Install

npm i use-reduce

Weekly Downloads

0

Version

1.2.1

License

MIT

Unpacked Size

1.36 MB

Total Files

33

Last publish

Collaborators

  • justin-the-developer