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.

Unique component identifier

See original GitHub issue

Both react-async and react-multiplayer need components to have unique identifiers.

In case of react-async — to maintain a mapping from a component to its state and make it serialisable (to send it over the wire, ES6 Map with components as keys can’t be used), in case of react-multiplayer — to have an unique URL per component instance.

Currently both of the libraries use this._rootNodeID + ',' + this._mountDepth. Should this be added to a public API — getComponentID() or something?

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:51 (19 by maintainers)

github_iconTop GitHub Comments

38reactions
lasercommented, Apr 23, 2015

@syranide @spicyj - For those of us who weren’t on IRC - what was the resolution?

31reactions
kromitcommented, Oct 24, 2016

2 years after the issue were closed there obviously still demand for a solution and discussion about it. I do not see any reason why the issue should not be reopened.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unique IDs and where to find them | by Anton Korzunov
Unique unique ID. Or uuid. Or just “always new”, never repeatable ID. Useful for generation session keys, transactions, IDs in database, etc. Due...
Read more >
Vue.js: How to set a unique ID for each component instance?
Each component has a unique id which can be accessed as this._uid . <template> <div> <label :for="id">Label text for {{id}}</label> <input ...
Read more >
AEM - Generate Unique ID for a Component - Suren's Site
For example, if we need to add unique id's for each element in a single component (like multi field component where we can...
Read more >
Universally unique identifier - Wikipedia
A universally unique identifier (UUID) is a 128-bit label used for information in computer systems. The term globally unique identifier (GUID) is also...
Read more >
AEM Development Quick Tip: Component Unique ID
Often times, you need a unique ID for the AEM component. You either need to trigger custom action with JS or make a...
Read more >

github_iconTop Related Medium Post

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