Overview
This guide walks through integrating the Encore Web SDK in a React 18+ application using hooks and TypeScript.Installation
Complete Setup Example
Step 1: Wrap Your App with EncoreProvider
main.tsx
Step 2: Use Encore in Components
App.tsx
Environment Variables
Create a.env file in your project root:
React Patterns
Identifying Users After Login
Working Example
Next Steps
- Configure SDK - Detailed configuration options
- Present Offers - Display targeted offers
- Track Entitlements - Server-side validation