1.0.2 • Published 5 years ago
use-fingerprint v1.0.2
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.