Default b_UIDs for components
See original GitHub issueShould all components have a default b_UID
on the parent container (if no ID provided)?
And if so, should IDs be “dynamic/reactive” or static once set?
Something like this?
data() {
return {
thisId: this.id || ('b_' + this._uid )
};
},
props: {
id: {
type: String,
default: null
}
}
And if IDs are required for other elements within the component they can be based on thisId
:
<template>
<div :id="thisId">
<span :id="thisId + '_myspan'">Some element</span>
<div :id="thisId + '_mydiiv'">Some other element</div>
<div>This one doesn't need ID</div>
</div>
</template>
Issue Analytics
- State:
- Created 6 years ago
- Comments:37 (37 by maintainers)
Top Results From Across the Web
Build Components | NUKE
With build components you can implement your build infrastructure once, and compose individual builds across different repositories.
Read more >Build Component Configurations
Third-party build components contain a default configuration but it may not be suitable for your project. As such, you should configure each component...
Read more >Chromium Docs - The Chrome Component Build
The component build is currently the default for debug non-iOS builds (it doesn't work for iOS). You can force it on for release...
Read more >Build System - ESP32 - — ESP-IDF Programming Guide latest ...
Defaults to all components found in the COMPONENT_DIRS directories. Use this variable to “trim down” the project for faster build times.
Read more >Build Targets - Vue CLI
App is the default build target. In this mode: index.html with asset and resource hints injection; vendor libraries split into a separate chunk ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Your mixin works but the validation type “Boolean” is wrong, I submitted a PR to your blob.
I would make the ID field a prop with default ‘b_’ + this._uid. Any events should be broadcast with the ID included in the data package. And yes it should be responsive. If the programmer wants to do screwy stuff with that then that’s fine.