Skills Development Local Storage Abstraction Utilities

Local Storage Abstraction Utilities

v20260424
webiny-admin-local-storage-catalog
This module provides multiple abstractions and hooks for interacting with the browser's LocalStorage API within an administrative context. It offers specialized utilities, including direct service access (LocalStorage instance) and advanced React hooks (useLocalStorage, useLocalStorageValues). These tools enable component developers to imperatively call services or efficiently observe single or multiple keys, ensuring consistent state management and proper re-rendering when local state changes.
Get Skill
480 downloads
Overview

admin/local-storage

How to Use

  1. Find the abstraction you need below
  2. You MUST read the source file to get the exact interface and types!
  3. Import: import { Name } from "<importPath>";

Abstractions


Name: LocalStorage Import: import { LocalStorage } from "webiny/admin/local-storage" Source: @webiny/app/features/localStorage/abstractions.ts


Name: useLocalStorage Import: import { useLocalStorage } from "webiny/admin/local-storage" Source: @webiny/app/presentation/localStorage/index.ts Description: Returns the LocalStorage instance from DI. Useful when you want to call service methods imperatively inside components.


Name: useLocalStorageValue Import: import { useLocalStorageValue } from "webiny/admin/local-storage" Source: @webiny/app/presentation/localStorage/index.ts


Name: useLocalStorageValues Import: import { useLocalStorageValues } from "webiny/admin/local-storage" Source: @webiny/app/presentation/localStorage/index.ts Description: Observes multiple keys in LocalStorage and returns an object of { key: value }. Re-renders when any of the observed keys change.


Info
Category Development
Name webiny-admin-local-storage-catalog
Version v20260424
Size 1.3KB
Updated At 2026-04-28
Language