Update README.MD
This commit is contained in:
@@ -49,12 +49,17 @@ mount(
|
|||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```ts
|
```tsx
|
||||||
// routes/example.tsx
|
// routes/example.tsx
|
||||||
import { trpc } from "./utils/trpc";
|
import { trpc } from "./utils/trpc";
|
||||||
import { createSignal } from "solid-js";
|
import { createSignal } from "solid-js";
|
||||||
const [name, setName] = createSignal("");
|
const [name, setName] = createSignal("");
|
||||||
const res = trpc.queryName.useQuery(() => ({ name: name() })); // this will be called onMount and when name changes
|
const res = trpc.queryName.useQuery(() => ({ name: name() })); // this will be called onMount and when name changes
|
||||||
|
|
||||||
|
export default function Exaple() {
|
||||||
|
return (
|
||||||
|
{...}
|
||||||
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Reactivity
|
### Reactivity
|
||||||
|
|||||||
Reference in New Issue
Block a user