gluestack-ui-v5:performance

Applies performance optimization and cross-platform patterns for gluestack-ui v5 React Native applications.

Updated Sep 6, 2026
One-click install
npx skills add https://github.com/sombek/fitness-guidance-app --skill gluestack-ui-v5-performance-sombek
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gluestack-ui-v5:performance
Source: https://github.com/sombek/fitness-guidance-app/tree/main/mobile/.agents/skills/gluestack-ui-v5/performance
Command: npx skills add https://github.com/sombek/fitness-guidance-app --skill gluestack-ui-v5-performance-sombek

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React Native apps built with gluestack-ui v5 often suffer from janky animations, unnecessary rerenders, unvirtualized long lists, and components that break on web. This Skill provides concrete rules and code patterns to keep apps fast and consistent across iOS, Android, and web. ## Core Features & Use Cases - Cross-Platform Rendering Rules: Enforces using Gluestack wrapper components (e.g., KeyboardAvoidingView, SafeAreaView) instead of direct react-native imports so components work on both native and web. - Performance Best Practices: Covers TypeScript typing, React.memo and useCallback memoization, Reanimated worklets for UI-thread animations, FlatList virtualization, and Platform.select usage. - v5-Specific Guidance: Documents NativeWind v5 requirements (pinning lightningcss to 1.30.1, CSS-first config) and UniWind trade-offs for reduced build steps. - Use Case: When building a screen with a long scrollable list and animations, apply the FlatList + memoized list item + Reanimated patterns to avoid dropped frames and rerender storms. ## Quick Start Review my gluestack-ui v5 screen component and fix any performance or cross-platform issues using these rules.

Frequently Asked Questions about gluestack-ui-v5:performance

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

FAQPage Schema
How do I optimize FlatList performance in React Native?

Use FlatList instead of ScrollView with map for lists of 10+ items, since FlatList virtualizes and only renders visible rows. Memoize list item components with React.memo and pass stable callbacks via useCallback to prevent rerenders.

How do I run animations at 60fps in React Native?

Use Reanimated worklets with useSharedValue and withTiming or withSpring so animations run on the native UI thread. Avoid the legacy Animated API from react-native, which runs on the JavaScript thread and can cause jank.

Should I use Gluestack wrappers or react-native components for web support?

Always use Gluestack wrapper components from @/components/ui/* instead of direct react-native imports when a wrapper exists. Wrappers like KeyboardAvoidingView handle platform differences automatically, while direct imports may break on web.

NativeWind v5 vs UniWind for gluestack-ui projects?

NativeWind v5 uses Tailwind v4 CSS-first configuration and requires pinning lightningcss to exactly 1.30.1 to avoid build failures. UniWind processes CSS at Metro/Babel time with no PostCSS step, which can reduce build times for simpler Expo-only projects.

Why does my NativeWind v5 build fail with CSS errors?

Mismatched lightningcss versions cause CSS transformation errors and build failures. Pin lightningcss to exactly 1.30.1 in both package.json overrides and resolutions, and keep postcss.config.js minimal with @tailwindcss/postcss.

When should I use React.memo and useCallback in React Native?

Wrap components in React.memo when they receive stable props but their parent rerenders frequently. Use useCallback for functions passed to child components so children do not rerender due to new function references on every render.