Skip to content
Agentmart
Submit a tool

expo-screens

Patrones de screens con data fetching: loading, error states, useCallback, useEffect.

Skill by myquota

IndexedMIT★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/cabrerojas-expo-screens

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Patrones de screens con data fetching: loading, error states, useCallback, useEffect. Trigger: Cuando se crean screens con datos, se manejan estados loading/error.

Use cases: data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/expo-screens

What's inside

Skill name
expo-screens
Description
Patrones de screens con data fetching: loading, error states, useCallback, useEffect. Trigger: Cuando se crean screens con datos, se manejan estados loading/error.
License
MIT
Metadata
author: myquota · version: 1.0
Instructions
321 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

## Propósito

Crear screens con data fetching consistentes, manejando loading y error states.

---

## Patrón Base

```tsx
import React, { useState, useEffect, useCallback } from "react";
import {
  View,
  Text,
  StyleSheet,
  ActivityIndicator,
  ScrollView,
} from "react-native";
import { colors, spacing } from "@/shared/theme/tokens";
import { getItems } from "../services/itemsApi";
import { Item } from "@/shared/types/item";

export default function ItemsScreen() {
  const [items, setItems] = useState<Item[]>([]);
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState<string | null>(null);

  const loadData = useCallback(async () => {
    try {
      setLoading(true);
      setError(null);
      const result = await getItems();
      setItems(result);
    } catch (err) {
      const message = err instanceof Error ? err.message : "Error inesperado";
      setError(message);
    } finally {
      setLoading(false);
    }
  }, []);

  useEffect(() => {
    loadData();
  }, [loadData]);

  if (loading) {
    return (
      <View style={styles.centered}>
        <ActivityIndicator size="large" color={colors.primary} />
      </View>
    );
  }

  if (error) {
    return (
      <View style={styles.centered}>
        <Text style={styles.errorText}>{error}</Text>
        <TouchableOpacity style={styles.retryButton} onPress={loadData}>
          <Text style={styles.retryText}>Reintentar</Text>
        </TouchableOpacity>
      </View>
    );
  }

  return (
    <ScrollView style={styles.container}>
      {items.map((item) => (
        <View key={item.id} style={styles.item}>
          <Text>{item.name}</Text>
        </View>
      ))}
    </ScrollView>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: colors.bgLight,
  },
  centered: {
    flex: 1,
    justifyContent: "center",
    alignItems: "center",
    padding: spacing.lg,
  },
  errorText: {
    color: colors.danger,
    fontSize: 16,
    textAlign: "center",
    marginBottom: spacing.md,
  },
  retryButton: {
    backgroundColor: colors.primary,
    paddingHorizontal: spacing.lg,
    paddingVertical: spacing.sm,
    borderRadius: 8,
  },
  retryText: {
    color: colors.white,
    fontWeight: "600",
  },
  item: {
    padding: spacing.md,
    backgroundColor: colors.white,
    marginBottom: spacing.sm,
  },
});
```

---

## Estructura de Estados

```tsx
// Siempre estos 3 estados
const [data, setData] = useState<T[]>([]);      // o T | null
const [loading, setLoading] = useState(true);   // true inicial
const [error, setError] = useState<string | null>(null);
```

From cabrerojas/myquota-app, MIT.

More from cabrerojas/myquota-app

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Aug 15, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
1.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from myquota

Cite this page

expo-screens skill. Agent Mart. https://agentmart.dev/skills/cabrerojas-expo-screens (last updated 2026-10-24)