Package Exports
- use-hashcode
- use-hashcode/dist/index.js
- use-hashcode/dist/use-hashcode.esm.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (use-hashcode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Installation
npm:
npm i use-hashcodeyarn:
yarn add use-hashcodePrepare
make sure you have crypto-js
npm i crypto-jsor
yarn add crypto-jsSummary
This package makes hash things easier in react using crypto-js
Usage
import { useFileHashCode } from 'use-hashcode'
const App = () => {
const { isHashLoading, isHashError, sha256 } = useFileHashCode(file, 'sha256')
const strMd5 = useStringHashCode('Hello, World', 'md5')
return (
<div>
{sha256}
{strMd5}
</div>
)
}