MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / generateId

Function generateId

packages/react/src/utils/generateId.ts:3–7  ·  view source on GitHub ↗
(type = 'main')

Source from the content-addressed store, hash-verified

1const ids: { [key: string]: number } = { main: 0 };
2
3export const generateId = (type = 'main') => {
4 const id = (ids[type] ?? 0) + 1;
5 ids[type] = id;
6 return id.toString();
7};

Callers 3

ReactDelegateFunction · 0.90
useOverlayFunction · 0.90
createRouteFunction · 0.90

Calls

no outgoing calls

Tested by 1

createRouteFunction · 0.72