local-state

Manage React Native/Expo local state with Apollo Client Reactive Variables and AsyncStorage.

3|3|Updated Jan 18, 2026
One-click install
npx skills add https://github.com/CodySwannGT/lisa --skill local-state
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: local-state
Source: https://github.com/CodySwannGT/lisa/tree/main/plugins/lisa-expo/skills/local-state
Command: npx skills add https://github.com/CodySwannGT/lisa --skill local-state

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a structured approach to managing local state in React Native/Expo applications, ensuring data persistence and reactivity for UI elements, user preferences, and feature flags.

Core Features & Use Cases

  • In-memory state: Utilize Apollo Client Reactive Variables for UI synchronization that resets on refresh.
  • Persistent state: Employ React Native AsyncStorage for data that needs to survive app restarts.
  • Use Case: Implement feature flags that can be toggled by the user and persist across app sessions, or manage user theme preferences that are saved locally.

Quick Start

Use the local-state skill to save user preferences to AsyncStorage.

Frequently Asked Questions about local-state

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage local state in React Native so it survives app restarts?

To manage local state in React Native across restarts, use Apollo Client Reactive Variables for in-memory UI synchronization and AsyncStorage for persistent storage, ensuring data like user preferences survives component unmounts and app restarts.

What is the best way to implement persistent feature flags in an Expo app?

The best way to implement persistent feature flags in Expo is using AsyncStorage to save the flag states locally, allowing toggles to persist across app sessions while using reactive variables to sync the UI instantly.

How do I keep React Native local state reactive when updating AsyncStorage?

To keep local state reactive when updating AsyncStorage, use immutable updates for your Apollo Client reactive variables so UI elements synchronize automatically without encountering stale data or reactivity issues.

Does Apollo Client reactive variables work with React Native for session state?

Yes, Apollo Client reactive variables work with React Native for session state by providing in-memory state that synchronizes UI elements, while AsyncStorage handles the persistent storage layer for data continuity.

Why does my local state disappear on refresh in React Native?

Local state disappears on refresh because in-memory state using reactive variables resets, requiring AsyncStorage to persist data like user theme preferences across app sessions and component unmounts.

How to handle asynchronous operations when saving user preferences to AsyncStorage?

Handle asynchronous operations when saving user preferences to AsyncStorage by carefully managing the async calls and using immutable updates to ensure reactive variables properly synchronize the UI without race conditions.