Hook useInstalledApps()
useInstalledApps(
options?:InstalledAppsOptions):App<WindowProps>[]
Source: installedApps.ts
Returns a reactive list of all currently installed apps.
The list stays in sync with appsConfig.installedApps, it updates automatically when apps are installed, uninstalled, or added.
Note: sort and filter must be stable references. Passing inline functions will recreate them on every render, causing an infinite render loop (Maximum update depth exceeded).
Parameters
options?
InstalledAppsOptions = {}
Returns
App<WindowProps>[]
Example
tsx
const installedApps = useInstalledApps();
const filter = useCallback((app: App) => app.name.includes(query), [query]);
const searchResults = useInstalledApps({ filter });
const sort = useCallback((a, b) => (a.metadata?.releaseDate ?? "").localeCompare(b.metadata?.releaseDate ?? ""), []);
const sortedByDate = useInstalledApps({ sort });