Skip to content

Commit

Permalink
docs: clarify variables and string literals meaning
Browse files Browse the repository at this point in the history
  • Loading branch information
tien committed Jun 19, 2024
1 parent c85358d commit 54e0bb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/docs/docs/getting-started/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ For more information on metadata syncing and type generation, please refer to th
The records of `ChainId` -> `Descriptor` here will be used to provide you with the right type definitions when using hooks.

```ts title="redot.d.ts"
// `dot` is the name we gave to `npx papi add`
import type { dot } from "@polkadot-api/descriptors";

declare module "@reactive-dot/core" {
export interface Chains {
// "polkadot" here can be any unique string value
polkadot: typeof dot;
}
}
Expand Down Expand Up @@ -102,6 +104,7 @@ import { Suspense } from "react";

const App = () => (
<ReDotProvider config={config}>
{/* `chainId` match the ID previously specified via `polkadot: typeof dot` */}
<ReDotChainProvider chainId="polkadot">
{/* Make sure there is at least one Suspense boundary wrapping the app */}
<Suspense>{/* ... */}</Suspense>
Expand Down

0 comments on commit 54e0bb3

Please sign in to comment.