fingerprintjs / fingerprintjs-pro-react

Fingerprint Pro Wrapper for React Single Page Applications (SPA)
MIT License
52 stars 8 forks source link

Add option to ignore cache if "immediate" is set to true #47

Closed TheUnderScorer closed 2 years ago

TheUnderScorer commented 2 years ago

Right now it you use the immediate flag to get data:

  const { getData, data, isLoading, error } = useVisitorData(
    { extendedResult: true },
    { immediate: true }
  );

there is no option to disable cache. It would be good if user could do something like this:

  const { getData, data, isLoading, error } = useVisitorData(
    { extendedResult: true, ignoreCache: true },
    { immediate: true }
  );

We can still keep the option to ignore cache in getData as well, and it should overwrite the option set in useVisitorData if it was passed there.

ilfa commented 2 years ago

:tada: This issue has been resolved in version 1.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: