Skip to content

Commit

Permalink
fix: useId prefix change
Browse files Browse the repository at this point in the history
The prefix changed in v3.5.3 vuejs/core@babfb4c
  • Loading branch information
cexbrayat committed Sep 18, 2024
1 parent ecc14cc commit ed6b9df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _posts/2024-09-05-what-is-new-vue-3.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const id = useId();
```

`useId` guarantees that the generated ID is unique within the application.
By default, Vue generates an ID with a prefix of `v:` followed by a unique number
By default, Vue generates an ID with a prefix of `v-` followed by a unique number
(that increments when new components are rendered).
The prefix can be customized by using `app.config.idPrefix`.
`useId` also guarantees that the ID is stable between server-side rendering and client-side rendering, to avoid mismatching errors.
Expand Down

0 comments on commit ed6b9df

Please sign in to comment.