Skip to content

Commit 32abf67

Browse files
committed
Update README.md
1 parent 4295d1e commit 32abf67

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,19 +404,17 @@ const myRoute = route({
404404
```tsx
405405
import { route, parser } from "react-router-typesafe-routes";
406406
import { schema } from "react-router-typesafe-routes/standard-schema";
407-
import { z } from "zod/v4"; // Zod v4 implements Standard Schema
407+
import { type } from "arktype"; // Or any other library supporting Standard Schema
408408

409409
const myRoute = route({
410410
path: ":id",
411411
// There is no way to get the type hint from a Standard Schema in runtime, so we need to specify it explicitly.
412412
// For the built-in parser, this is only necessary for strings and dates. It's also type-safe!
413413
// It's needed for omitting wrapping quotes in serialized values.
414-
params: { id: schema(z.string().uuid(), parser("string")) },
414+
params: { id: schema(type("string.uuid"), parser("string")) },
415415
});
416416
```
417417

418-
> ❗Zod doesn't do coercion by default, but you may need it for complex values returned from `JSON.parse` (for instance, a date wrapped in an object).
419-
420418
</details>
421419

422420
### Use Zod

0 commit comments

Comments
 (0)