presentOffer().
Signature
Return Value
Type:PlacementBuilder
PlacementBuilder Methods
Set callback for when entitlement is grantedReturns:
PlacementBuilder for chainingSet callback for when entitlement is not grantedReturns:
PlacementBuilder for chainingSet callback for loading state changesReturns:
PlacementBuilder for chainingDisplay the offer modalReturns:
Promise<PresentationResult>Examples
Basic Usage
With Loading State
Complete Example
Framework Integration
- React
- Vue
- Angular
Comparison with presentOffer()
Both methods are equivalent, choose based on your preference:- placement() - Fluent
- presentOffer() - Options
Callback Execution
Callbacks are executed in this order:onLoadingStateChange(true)- When modal starts loadingonGranted()ORonNotGranted()- Based on resultonLoadingStateChange(false)- When modal closes
Method Chaining
All builder methods returnthis, allowing method chaining:
Best Practices
1. Always Call show()
The builder doesn’t present anything untilshow() is called:
2. Use Loading State Callback
Provide feedback during async operations:3. Handle All Outcomes
4. Callbacks Are Optional
You can use the builder without callbacks:Complete Example
Related Methods
- presentOffer() - Alternative presentation method
- isActive() - Check entitlements before presenting
- Present Offers Guide - Complete presentation patterns
Next Steps
- isActive() - Check entitlements
- Event Handling - Subscribe to entitlement changes