MCPcopy Create free account
hub / github.com/microsoft/SandDance / useId

Function useId

docs/app/js/sanddance-app.js:34669–34675  ·  view source on GitHub ↗
(prefix, providedId)

Source from the content-addressed store, hash-verified

34667var _react = require("react");
34668var _getId = require("@uifabric/utilities/lib/getId");
34669function useId(prefix, providedId) {
34670 // getId should only be called once since it updates the global constant for the next ID value.
34671 // (While an extra update isn't likely to cause problems in practice, it's better to avoid it.)
34672 var ref = _react.useRef(providedId);
34673 if (!ref.current) ref.current = (0, _getId.getId)(prefix);
34674 return ref.current;
34675}
34676
34677},{"react":"8ePka","@uifabric/utilities/lib/getId":"XXn0P","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"aLTbb":[function(require,module,exports) {
34678var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected