For the complete documentation index, see llms.txt. This page is also available as Markdown.

Storage.getItem

기능 설명

모바일 앱의 로컬 저장소에서 문자열 데이터를 가져와요. 앱이 종료되었다가 다시 시작해도 데이터가 유지되어야 할 때 사용해요. 값이 없으면 null을 반환해요.

타입

Storage.getItem(key: string): Promise<string | null>;

Params

  • key: string — 값을 가져올 키예요.

Response

값이 없으면 null을 반환해요.

예시 코드

JavaScript

import { Storage } from "@apps-in-toss/web-framework";

const value = await Storage.getItem("my-key");
console.log(value); // 'value' 또는 null

도움이 되었나요?