@amp-labs/react 2.10.1 → 2.11.1

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.
package/README.md CHANGED
@@ -24,6 +24,26 @@ This repository contains the Ampersand React library, a set of React components
24
24
  ## Prerequisites
25
25
  - React version 18+
26
26
 
27
+ ### Next.js App Router
28
+
29
+ This library uses React hooks, browser APIs, and client-side dependencies throughout, making it a client-side library. When using Next.js App Router (v13+), ensure that components importing from `@amp-labs/react` are within a client boundary.
30
+
31
+ The library includes the `'use client'` directive at its entry points, so it should work automatically in most cases. If you encounter SSR-related errors, wrap your usage in a client component:
32
+
33
+ ```tsx
34
+ 'use client';
35
+
36
+ import { AmpersandProvider, ConnectProvider } from '@amp-labs/react';
37
+
38
+ export function MyIntegrationComponent() {
39
+ return (
40
+ <AmpersandProvider options={options}>
41
+ <ConnectProvider /* ... */ />
42
+ </AmpersandProvider>
43
+ );
44
+ }
45
+ ```
46
+
27
47
  ### Legacy (@amp-labs/react 1.x.x)
28
48
  Requires
29
49
  - Chakra 2.4.4 - 2.10 (https://chakra-ui.com/getting-started)