Skip to content

Commit

Permalink
add React v19 TypeScript error suppression guidance for global compon…
Browse files Browse the repository at this point in the history
…ents (#277)
  • Loading branch information
rtomas authored Feb 5, 2025
1 parent a4c941d commit 3bc0d7c
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/appkit/next/core/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ import Components from '../../shared/components.mdx'
import Table from '../../../components/Table'

# Web Components
:::warning
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:

```tsx
{/* @ts-expect-error msg */}
<appkit-button />
```

This will prevent TypeScript from reporting errors related to global component types.
:::
<Components />

### `<appkit-wallet-button />`
Expand Down
10 changes: 10 additions & 0 deletions docs/appkit/next/core/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ Create a new project on Reown Cloud at https://cloud.reown.com and obtain a new

## Trigger the modal

:::warning
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:

```tsx
{/* @ts-expect-error msg */}
<appkit-button />
```

This will prevent TypeScript from reporting errors related to global component types.
:::
<PlatformTabs groupId="eth-lib" activeOptions={["wagmi", "ethers5","ethers","solana","bitcoin"]}>
<PlatformTabItem value="wagmi">

Expand Down
11 changes: 11 additions & 0 deletions docs/appkit/react/core/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,18 @@ import Table from '../../../components/Table'
import Components from '../../shared/components.mdx'

# Web Components
## Trigger the modal

:::warning
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:

```tsx
{/* @ts-expect-error msg */}
<appkit-button />
```

This will prevent TypeScript from reporting errors related to global component types.
:::
<Components />

### `<appkit-wallet-button />`
Expand Down
11 changes: 11 additions & 0 deletions docs/appkit/react/core/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,17 @@ Create a new project on reown Cloud at https://cloud.reown.com and obtain a new

## Trigger the modal

:::warning
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:

```tsx
{/* @ts-expect-error msg */}
<appkit-button />
```

This will prevent TypeScript from reporting errors related to global component types.
:::

<PlatformTabs groupId="eth-lib" activeOptions={["wagmi", "ethers5","ethers","solana","bitcoin"]}>
<PlatformTabItem value="wagmi">

Expand Down

0 comments on commit 3bc0d7c

Please sign in to comment.