-
-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: use vue 3.5 useId
#1267
Comments
The The error you see is because muxt changed their update: toast is fine, the id was not from |
Correct @RayGuo-ergou . Your suggestion here should eliminate the need of passing |
Hi @zernonia should still handle the typescript error above tho as: https://github.com/vuejs/core/blob/b1430f250d6aef7f866d9a670895d83596119b42/packages/runtime-core/src/helpers/useId.ts#L8 Even tho I am not a big fan of But this should indeed resolve the hydration mismatch issue. |
I was thinking to provide a default value for the config provider, at later stages we could mark useId as deprecated. |
Tried to build a simple project in both way, the file size seems identical. I am guessing due to vue's well structure export, vite can auto tree shaking the import.
I would suggest the nuxt way, make the |
Did a quick test // index.js
import * as util from './util'
util.foo() // util.js
function foo() {
console.log('foo')
}
function bar() {
console.log('bar')
}
export {
bar,
foo,
} run get cat bundle.js
───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: bundle.js
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ function foo() {
2 │ console.log('foo');
3 │ }
4 │
5 │ foo(); |
any update on how to resolve the issue? |
We are waiting for a PR, you can still use
|
Describe the feature
Since vue released 3.5 and has a ssr friendly useId, would be better to switch to it.
I can think something like this for backward compatibility
Additional information
The text was updated successfully, but these errors were encountered: