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

1.0.2 • Public • Published

useFingerprint

This is a convenient wrapper around https://github.com/Valve/fingerprintjs2 to use in react apps.

usage

  import useFingerprint from 'use-fingerprint';
 
  /* [..] */
 
  const myComponent = () => {
    const fingerprint = useFingerprint();
 
    return (
      <div>
        Your fingerprint is {fingerprint}
      </div>
    );
  }

caveats

Note that getting the fingerprint happens asynchronously and the value will not be populated right away. See https://github.com/Valve/fingerprintjs2/issues/254 and https://github.com/Valve/fingerprintjs2/issues/307 for explanation on why that is.

Readme

Keywords

none

Package Sidebar

Install

npm i use-fingerprint

Weekly Downloads

10

Version

1.0.2

License

WTFPL

Unpacked Size

56.1 kB

Total Files

23

Last publish

Collaborators

  • tastenjesus