@one-payments/react 1.1.13 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +26 -0
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -240,9 +240,35 @@ interface StateChangedPayload {
240
240
  }
241
241
  ```
242
242
 
243
+ ## Next.js Integration
244
+
245
+ Using this package with Next.js requires special handling for Server-Side Rendering (SSR). See our comprehensive [Next.js Integration Guide](../../docs/integration-guides/nextjs.md) for detailed instructions.
246
+
247
+ ### Quick Summary for Next.js
248
+
249
+ ```tsx
250
+ // Use dynamic import with ssr: false
251
+ import dynamic from 'next/dynamic';
252
+
253
+ const OnePayment = dynamic(
254
+ () => import('@one-payments/react').then((mod) => mod.OnePayment),
255
+ { ssr: false }
256
+ );
257
+
258
+ // Initialize adapters on client-side only
259
+ useEffect(() => {
260
+ import('@one-payments/adapters-web').then(({ createWebAdapters }) => {
261
+ setAdapters(createWebAdapters());
262
+ });
263
+ }, []);
264
+ ```
265
+
266
+ [→ Full Next.js Integration Guide](../../docs/integration-guides/nextjs.md)
267
+
243
268
  ## Requirements
244
269
 
245
270
  - React >= 16.8.0 (hooks support)
271
+ - React 19+ supported
246
272
  - TypeScript >= 5.0.0 (for TypeScript projects)
247
273
 
248
274
  ## Related Packages
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@one-payments/react",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "description": "React wrapper for One Payments SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -25,8 +25,8 @@
25
25
  "test": "vitest"
26
26
  },
27
27
  "peerDependencies": {
28
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
29
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
28
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
29
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
30
30
  },
31
31
  "dependencies": {
32
32
  "@one-payments/core": "^1.1.5",