React Provider Adapters
@picsart/runtime/providers/react/*
Reference service-provider implementations that assemble service objects from Picsart's React ecosystem and bridge React contexts into the kernel's service contracts. React and React DOM are optional peer dependencies — non-React hosts never install them.
Two composition styles
| Entry point | Export | Style |
|---|---|---|
@picsart/runtime/providers/react/full | FullRuntimeProviders | Declarative — every adapter configured via props |
@picsart/runtime/providers/react | RuntimeProviders, useRuntimeServices | Manual — bring your own adapter selection |
FullRuntimeProviders wraps the tree in this order, then calls
onServicesReady(services) with the assembled IRuntimeServices:
<FullRuntimeProviders ...props>
├── IntlProvider (localization)
├── GrowthAuthProvider (authentication)
├── PulseProvider (analytics)
├── DesignSystemProvider (notifier, dialog, theming)
├── ErrorBoundary (error boundary wrapper)
└── NoNetworkProvider (offline detection)
│
▼
onServicesReady(services) → spread into createRuntime
Adapter modules
Each adapter is independently optional:
| Entry point | Bridges |
|---|---|
.../adapters/growth-rc | @picsart/growth-rc authentication context |
.../adapters/pulse | @pulse/react analytics context |
.../adapters/intl | Picsart localization |
.../adapters/design-system | Notifier, dialog, theming |
.../adapters/error-boundary | Error boundary via @picsart/growth-rc |
.../adapters/no-network | Network-status / offline detection |
.../adapters/monetization | Monetization / checkout controls |
Environment variables
The underlying Picsart libraries read process.env.REACT_APP_* at
module-evaluation time — build-time constants, not runtime props. Define
them via your bundler (Vite define, webpack DefinePlugin):
| Variable | Purpose |
|---|---|
REACT_APP_NODE_ENV | Environment mode |
REACT_APP_API_URL | API gateway base URL |
REACT_APP_AI_WEB | AI services gateway URL |
REACT_APP_UPLOAD_API_URL | Upload service base URL |
REACT_APP_MINIAPPS_PLATFORM_SDK | SDK environment (staging/production) |
REACT_APP_X_APP_AUTHORIZATION_TOKEN | Application-level Bearer token |
REACT_APP_WS_URL | WebSocket API base URL |
REACT_APP_PICSART_BASE_DOMAIN | Base domain for cookies and redirects |
REACT_APP_RECAPTCHA_PUBLIC_KEY | reCAPTCHA Enterprise v3 site key |
REACT_APP_GOOGLE_RECAPTCHA_SITE_KEY_V2 | reCAPTCHA v2 fallback site key |
The useRuntimeServices hook
useRuntimeServices() reads the assembled services from context. Because each
package entry point is a separate bundle, the hook and the provider must come
from the same entry — see the context-identity caveat in
Installation and the
Embedded Public API.