Skip to content

Commit e97fafa

Browse files
committed
perf(package-versions): use shallowRef instead deep ref
1 parent 4d3ef43 commit e97fafa

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

app/components/PackageVersions.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,16 @@ const expandedTags = ref<Set<string>>(new Set())
119119
const tagVersions = ref<Map<string, VersionDisplay[]>>(new Map())
120120
const loadingTags = ref<Set<string>>(new Set())
121121
122-
const otherVersionsExpanded = ref(false)
123-
const otherMajorGroups = ref<
122+
const otherVersionsExpanded = shallowRef(false)
123+
const otherMajorGroups = shallowRef<
124124
Array<{ major: number; versions: VersionDisplay[]; expanded: boolean }>
125125
>([])
126-
const otherVersionsLoading = ref(false)
126+
const otherVersionsLoading = shallowRef(false)
127127
128128
// Cached full version list (local to component instance)
129-
const allVersionsCache = ref<PackageVersionInfo[] | null>(null)
130-
const loadingVersions = ref(false)
131-
const hasLoadedAll = ref(false)
129+
const allVersionsCache = shallowRef<PackageVersionInfo[] | null>(null)
130+
const loadingVersions = shallowRef(false)
131+
const hasLoadedAll = shallowRef(false)
132132
133133
// Load all versions using shared function
134134
async function loadAllVersions(): Promise<PackageVersionInfo[]> {

0 commit comments

Comments
 (0)