Skip to content

Commit 3bc0d7c

Browse files
authored
add React v19 TypeScript error suppression guidance for global components (#277)
1 parent a4c941d commit 3bc0d7c

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed

docs/appkit/next/core/components.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ import Components from '../../shared/components.mdx'
66
import Table from '../../../components/Table'
77

88
# Web Components
9+
:::warning
10+
If you are using React v19 and global components. Please add, before the component, the following directive to temporarily suppress TypeScript errors until the upgrade is fully supported:
911

12+
```tsx
13+
{/* @ts-expect-error msg */}
14+
<appkit-button />
15+
```
16+
17+
This will prevent TypeScript from reporting errors related to global component types.
18+
:::
1019
<Components />
1120

1221
### `<appkit-wallet-button />`

docs/appkit/next/core/installation.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,16 @@ Create a new project on Reown Cloud at https://cloud.reown.com and obtain a new
140140

141141
## Trigger the modal
142142

143+
:::warning
144+
If you are using React v19 and global components. Please add, before the component, the following directive to temporarily suppress TypeScript errors until the upgrade is fully supported:
145+
146+
```tsx
147+
{/* @ts-expect-error msg */}
148+
<appkit-button />
149+
```
150+
151+
This will prevent TypeScript from reporting errors related to global component types.
152+
:::
143153
<PlatformTabs groupId="eth-lib" activeOptions={["wagmi", "ethers5","ethers","solana","bitcoin"]}>
144154
<PlatformTabItem value="wagmi">
145155

docs/appkit/react/core/components.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,18 @@ import Table from '../../../components/Table'
66
import Components from '../../shared/components.mdx'
77

88
# Web Components
9+
## Trigger the modal
910

11+
:::warning
12+
If you are using React v19 and global components. Please add, before the component, the following directive to temporarily suppress TypeScript errors until the upgrade is fully supported:
13+
14+
```tsx
15+
{/* @ts-expect-error msg */}
16+
<appkit-button />
17+
```
18+
19+
This will prevent TypeScript from reporting errors related to global component types.
20+
:::
1021
<Components />
1122

1223
### `<appkit-wallet-button />`

docs/appkit/react/core/installation.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,17 @@ Create a new project on reown Cloud at https://cloud.reown.com and obtain a new
144144

145145
## Trigger the modal
146146

147+
:::warning
148+
If you are using React v19 and global components. Please add, before the component, the following directive to temporarily suppress TypeScript errors until the upgrade is fully supported:
149+
150+
```tsx
151+
{/* @ts-expect-error msg */}
152+
<appkit-button />
153+
```
154+
155+
This will prevent TypeScript from reporting errors related to global component types.
156+
:::
157+
147158
<PlatformTabs groupId="eth-lib" activeOptions={["wagmi", "ethers5","ethers","solana","bitcoin"]}>
148159
<PlatformTabItem value="wagmi">
149160

0 commit comments

Comments
 (0)