-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
docs: proposal for two new immutable methods for Vue's list rendering #2709
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for vuejs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Note that these are ES2023 features not available in over 10% browsers and require manually configuring tsconfig. |
I have three considerations.
|
Although I agree that it should at least come with a comment and warning about potential issues, I am not sure you're right in the part about requiring manual configuration. I just scaffolded fresh Vue project starter by |
Not in tsconfig.dom.json. You probably are trying inside some ts file. It should show error in sfc. But yeah, I agree, it's there for about a year now. We can just add a note like "if you're targeting newer browsers, you can directly use toReversed/toSorted instead" |
This file is extending general |
You're right. I was checking whether the app can run without complaining during build time, not the actual appearance in VSCode. |
This is a terribly wrong consideration, imo. Nowadays tools allow people using them without deeper understanding of the principles behind. I think it is generally a good thing, because it allows awesome content being created by almost everyone, but you should keep that in mind and not assuming others know what you do. |
Yeah, the type-check command (vue-tsc) will throw error, build won't because vite doesn't check types. |
I think you are right, so I have added the new background of these two functions and solutions to common problems (editor or browser) in the main body of the document and code comments. |
Description of Problem
Proposed Solution
Additional Information
JavaScript provides two new immutable methods on arrays to solve the problem of legacy functions with side effects. These two methods also apply to Vue's list rendering optimizations as well, so I've modified the documentation to add suggestions for them.