question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default b_UIDs for components

See original GitHub issue

Should 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:closed
  • Created 6 years ago
  • Comments:37 (37 by maintainers)

github_iconTop GitHub Comments

1reaction
GregPedencommented, Apr 25, 2017

Your mixin works but the validation type “Boolean” is wrong, I submitted a PR to your blob.

1reaction
GregPedencommented, Apr 24, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found