Rovenue Web SDK
    Preparing search index...

    Function usePlacement

    • A placement's served content (a funnel envelope, or nothing).

      An unknown placement returns an empty envelope rather than a 404, so this resolves with nothing to show instead of erroring — the caller renders nothing, which is the behaviour a placement that has not been configured yet should have.

      Each identifier has its own value: changing identifier shows that placement's value (null with isLoading: true the first time), never the previous identifier's, whichever answer arrives last. A placement is served per subscriber, so identify() / logOut() reset it to null and fetch it again, like useEntitlements. A failed request sets error and keeps the value already shown for this identifier and identity.

      Parameters

      • identifier: string

      Returns PlacementState