diff --git a/coverage/badges.svg b/coverage/badges.svg index 76978e7..671d312 100644 --- a/coverage/badges.svg +++ b/coverage/badges.svg @@ -1,14 +1,14 @@ coverage: 91.93% - + - - + + - +

All files

  • Type Parameters

    • T extends boolean

    Parameters

    • props: PropsWithChildren<FpjsProviderOptions>

    Returns Element

    Example

    <FpjsProvider
    loadOptions = {{
    apiKey: "<your-fpjs-public-api-key>"
    }}
    cacheTime={60 * 10}
    cacheLocation={CacheLocation.LocalStorage}
    >
    <MyApp />
    </FpjsProvider>

    Provides the FpjsContext to its child components.

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/useVisitorData.html b/functions/useVisitorData.html index 7b083b4..9fcaba0 100644 --- a/functions/useVisitorData.html +++ b/functions/useVisitorData.html @@ -3,4 +3,4 @@

Returns VisitorQueryContext<TExtended>

Example

 const {
// Request state
data,
isLoading,
error,
// A method to be called manually when the `immediate` field in the config is set to `false`:
getData,
} = useVisitorData({ extended: true }, { immediate: false });

Use the useVisitorData hook in your components to perform identification requests with the FingerprintJS API. The returned object contains information about loading status, errors, and visitor.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/index.html b/index.html index b24f337..6cfaedd 100644 --- a/index.html +++ b/index.html @@ -52,7 +52,7 @@ To get your API key and get started, see the Fingerprint Pro Quick Start Guide.

1. Wrap your application (or component) in <FpjsProvider>.

// src/index.js
import React from 'react'
import ReactDOM from 'react-dom/client'
import {
FpjsProvider,
FingerprintJSPro,
} from '@fingerprintjs/fingerprintjs-pro-react'
import App from './App'

const root = ReactDOM.createRoot(document.getElementById('app'))

root.render(
<FpjsProvider
loadOptions={{
apiKey: 'your-public-api-key',
// region: 'eu',
endpoint: [
// 'metrics.yourwebsite.com',
FingerprintJSPro.defaultEndpoint,
],
scriptUrlPattern: [
// 'https://metrics.yourwebsite.com/web/v<version>/<apiKey>/loader_v<loaderVersion>.js',
FingerprintJSPro.defaultScriptUrlPattern,
],
}}
>
<App />
</FpjsProvider>
) diff --git a/interfaces/FpjsContextInterface.html b/interfaces/FpjsContextInterface.html index d491fe6..2d9a9be 100644 --- a/interfaces/FpjsContextInterface.html +++ b/interfaces/FpjsContextInterface.html @@ -1,4 +1,4 @@ FpjsContextInterface | @fingerprintjs/fingerprintjs-pro-react

Interface FpjsContextInterface<TExtended>

The FingerprintJS Context

-
interface FpjsContextInterface<TExtended> {
    clearCache: (() => void);
    getVisitorData: ((config?, ignoreCache?) => Promise<VisitorData<TExtended>>);
}

Type Parameters

  • TExtended extends boolean

Properties

interface FpjsContextInterface<TExtended> {
    clearCache: (() => void);
    getVisitorData: ((config?, ignoreCache?) => Promise<VisitorData<TExtended>>);
}

Type Parameters

  • TExtended extends boolean

Properties

clearCache: (() => void)

Type declaration

    • (): void
    • Returns void

getVisitorData: ((config?, ignoreCache?) => Promise<VisitorData<TExtended>>)

Type declaration

Generated using TypeDoc

\ No newline at end of file +

Properties

clearCache: (() => void)

Type declaration

    • (): void
    • Returns void

getVisitorData: ((config?, ignoreCache?) => Promise<VisitorData<TExtended>>)

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/GetDataOptions.html b/interfaces/GetDataOptions.html index 6a7874c..b9fe815 100644 --- a/interfaces/GetDataOptions.html +++ b/interfaces/GetDataOptions.html @@ -1,5 +1,5 @@ GetDataOptions | @fingerprintjs/fingerprintjs-pro-react

Interface GetDataOptions<TExtended>

Deprecated

Use FingerprintJSPro.GetOptions instead, this export will be removed in the next major version

-
interface GetDataOptions<TExtended> {
    debug?: boolean;
    disableTls?: boolean;
    extendedResult?: TExtended;
    ignoreCache?: boolean;
    ipResolution?: unknown;
    linkedId?: string;
    products?: readonly Product[];
    tag?: unknown;
    timeout?: number;
}

Type Parameters

  • TExtended extends boolean

Hierarchy (view full)

Properties

interface GetDataOptions<TExtended> {
    debug?: boolean;
    disableTls?: boolean;
    extendedResult?: TExtended;
    ignoreCache?: boolean;
    ipResolution?: unknown;
    linkedId?: string;
    products?: readonly Product[];
    tag?: unknown;
    timeout?: number;
}

Type Parameters

  • TExtended extends boolean

Hierarchy (view full)

Properties

Deprecated

Use the disableTls option of load() instead

extendedResult?: TExtended

Adds details about the visitor to the result

ignoreCache?: boolean

When set to true, the visitor data will always be fetched from our API.

-
ipResolution?: unknown

Deprecated

Does nothing

+
ipResolution?: unknown

Deprecated

Does nothing

linkedId?: string

linkedId is a way of linking current identification event with a custom identifier. This can be helpful to be able to filter API visit information later.

products?: readonly Product[]

Products to enable (within those that are turned on in Dashboard). You won't be billed for the disabled products. diff --git a/interfaces/QueryResult.html b/interfaces/QueryResult.html index b42def4..83a74f3 100644 --- a/interfaces/QueryResult.html +++ b/interfaces/QueryResult.html @@ -1,7 +1,7 @@ -QueryResult | @fingerprintjs/fingerprintjs-pro-react

Interface QueryResult<TData, TError>

interface QueryResult<TData, TError> {
    data?: TData;
    error?: TError;
    isLoading?: boolean;
}

Type Parameters

  • TData
  • TError = Error

Hierarchy (view full)

Properties

data? +QueryResult | @fingerprintjs/fingerprintjs-pro-react

Interface QueryResult<TData, TError>

interface QueryResult<TData, TError> {
    data?: TData;
    error?: TError;
    isLoading?: boolean;
}

Type Parameters

  • TData
  • TError = Error

Hierarchy (view full)

Properties

data?: TData

Stores current query data

-
error?: TError

Stores current query error

-
isLoading?: boolean

Is true while query is loading

-

Generated using TypeDoc

\ No newline at end of file +
error?: TError

Stores current query error

+
isLoading?: boolean

Is true while query is loading

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/UseVisitorDataConfig.html b/interfaces/UseVisitorDataConfig.html index 539f272..0f1bca8 100644 --- a/interfaces/UseVisitorDataConfig.html +++ b/interfaces/UseVisitorDataConfig.html @@ -1,3 +1,3 @@ -UseVisitorDataConfig | @fingerprintjs/fingerprintjs-pro-react
interface UseVisitorDataConfig {
    immediate: boolean;
}

Properties

immediate +UseVisitorDataConfig | @fingerprintjs/fingerprintjs-pro-react
interface UseVisitorDataConfig {
    immediate: boolean;
}

Properties

Properties

immediate: boolean

Determines whether the getData() method will be called immediately after the hook mounts or not

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/VisitorQueryContext.html b/interfaces/VisitorQueryContext.html index f9fa97d..42135bc 100644 --- a/interfaces/VisitorQueryContext.html +++ b/interfaces/VisitorQueryContext.html @@ -1,9 +1,9 @@ -VisitorQueryContext | @fingerprintjs/fingerprintjs-pro-react

Interface VisitorQueryContext<TExtended>

interface VisitorQueryContext<TExtended> {
    data?: VisitorData<TExtended>;
    error?: Error;
    getData: ((getDataOptions?) => Promise<VisitorData<TExtended>>);
    isLoading?: boolean;
}

Type Parameters

  • TExtended extends boolean

Hierarchy (view full)

Properties

data? +VisitorQueryContext | @fingerprintjs/fingerprintjs-pro-react

Interface VisitorQueryContext<TExtended>

interface VisitorQueryContext<TExtended> {
    data?: VisitorData<TExtended>;
    error?: Error;
    getData: ((getDataOptions?) => Promise<VisitorData<TExtended>>);
    isLoading?: boolean;
}

Type Parameters

  • TExtended extends boolean

Hierarchy (view full)

Properties

Stores current query data

-
error?: Error

Stores current query error

-
getData: ((getDataOptions?) => Promise<VisitorData<TExtended>>)

Performs identification request to server and returns visitors data.

-

Type declaration

isLoading?: boolean

Is true while query is loading

-

Generated using TypeDoc

\ No newline at end of file +
error?: Error

Stores current query error

+
getData: ((getDataOptions?) => Promise<VisitorData<TExtended>>)

Performs identification request to server and returns visitors data.

+

Type declaration

isLoading?: boolean

Is true while query is loading

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/VisitorQueryResult.html b/interfaces/VisitorQueryResult.html index 2f5abc2..3c0de8f 100644 --- a/interfaces/VisitorQueryResult.html +++ b/interfaces/VisitorQueryResult.html @@ -1,7 +1,7 @@ -VisitorQueryResult | @fingerprintjs/fingerprintjs-pro-react

Interface VisitorQueryResult<TExtended>

interface VisitorQueryResult<TExtended> {
    data?: VisitorData<TExtended>;
    error?: Error;
    isLoading?: boolean;
}

Type Parameters

  • TExtended extends boolean

Hierarchy (view full)

Properties

data? +VisitorQueryResult | @fingerprintjs/fingerprintjs-pro-react

Interface VisitorQueryResult<TExtended>

interface VisitorQueryResult<TExtended> {
    data?: VisitorData<TExtended>;
    error?: Error;
    isLoading?: boolean;
}

Type Parameters

  • TExtended extends boolean

Hierarchy (view full)

Properties

Stores current query data

-
error?: Error

Stores current query error

-
isLoading?: boolean

Is true while query is loading

-

Generated using TypeDoc

\ No newline at end of file +
error?: Error

Stores current query error

+
isLoading?: boolean

Is true while query is loading

+

Generated using TypeDoc

\ No newline at end of file diff --git a/types/UseVisitorDataOptions.html b/types/UseVisitorDataOptions.html index 2cf9014..8baa748 100644 --- a/types/UseVisitorDataOptions.html +++ b/types/UseVisitorDataOptions.html @@ -1 +1 @@ -UseVisitorDataOptions | @fingerprintjs/fingerprintjs-pro-react

Type alias UseVisitorDataOptions<TExtended>

UseVisitorDataOptions<TExtended>: GetDataOptions<TExtended>

Type Parameters

  • TExtended extends boolean

Generated using TypeDoc

\ No newline at end of file +UseVisitorDataOptions | @fingerprintjs/fingerprintjs-pro-react

Type alias UseVisitorDataOptions<TExtended>

UseVisitorDataOptions<TExtended>: GetDataOptions<TExtended>

Type Parameters

  • TExtended extends boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/variables/FpjsContext.html b/variables/FpjsContext.html index 163cff8..19a1f41 100644 --- a/variables/FpjsContext.html +++ b/variables/FpjsContext.html @@ -1 +1 @@ -FpjsContext | @fingerprintjs/fingerprintjs-pro-react
FpjsContext: Context<FpjsContextInterface<any>> = ...

Generated using TypeDoc

\ No newline at end of file +FpjsContext | @fingerprintjs/fingerprintjs-pro-react
FpjsContext: Context<FpjsContextInterface<any>> = ...

Generated using TypeDoc

\ No newline at end of file