Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
1
const
ids: { [key: string]: number } = { main: 0 };
2
3
export
const
generateId = (
type
=
'main'
) => {
4
const
id = (ids[
type
] ?? 0) + 1;
5
ids[
type
] = id;
6
return
id.toString();
7
};
Callers
3
ReactDelegate
Function · 0.90
useOverlay
Function · 0.90
createRoute
Function · 0.90
Calls
no outgoing calls
Tested by
1
createRoute
Function · 0.72