Back to list
333-333-333

react-native

by 333-333-333

Voice-activated vision assistant using computer vision and TTS to help blind users understand their surroundings through natural language descriptions. Built with React Native and Azure.

0🍴 0📅 Jan 20, 2026

SKILL.md


name: react-native description: > React Native patterns, components, and mobile development best practices. Trigger: When working with React Native components, navigation, or mobile-specific code. license: Apache-2.0 metadata: author: 333-333-333 version: "1.0" scope: [mobile] auto_invoke: - "Creating React Native components" - "Working with mobile navigation" - "Handling mobile-specific APIs"

When to Use

  • Creating or modifying React Native components
  • Implementing navigation flows
  • Handling platform-specific code (iOS/Android)
  • Working with native modules
  • Optimizing mobile performance

Critical Patterns

Component Structure

// Functional components with hooks (preferred)
import { View, Text, StyleSheet } from 'react-native';

export function MyComponent({ title, onPress }) {
  const [state, setState] = useState(null);

  return (
    <View style={styles.container}>
      <Text style={styles.title}>{title}</Text>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    padding: 16,
  },
  title: {
    fontSize: 18,
    fontWeight: '600',
  },
});

Platform-Specific Code

import { Platform } from 'react-native';

// Inline
const padding = Platform.OS === 'ios' ? 20 : 16;

// Platform.select
const styles = StyleSheet.create({
  container: {
    ...Platform.select({
      ios: { shadowColor: '#000', shadowOffset: { width: 0, height: 2 } },
      android: { elevation: 4 },
    }),
  },
});

// File-based: Component.ios.js / Component.android.js

Safe Area Handling

import { SafeAreaView } from 'react-native-safe-area-context';

// Always wrap root screens
export function Screen({ children }) {
  return (
    <SafeAreaView style={{ flex: 1 }} edges={['top', 'bottom']}>
      {children}
    </SafeAreaView>
  );
}

Performance Rules

RuleWhy
Use FlatList for listsVirtualized, only renders visible items
Memoize callbacks with useCallbackPrevents unnecessary re-renders
Memoize expensive computations with useMemoAvoids recalculation
Use React.memo for pure componentsSkips re-render if props unchanged
Avoid inline stylesCreates new objects every render

FlatList Optimization

<FlatList
  data={items}
  keyExtractor={(item) => item.id}
  renderItem={renderItem}
  getItemLayout={(data, index) => ({
    length: ITEM_HEIGHT,
    offset: ITEM_HEIGHT * index,
    index,
  })}
  removeClippedSubviews={true}
  maxToRenderPerBatch={10}
  windowSize={5}
/>

Accessibility

<TouchableOpacity
  accessible={true}
  accessibilityLabel="Take photo"
  accessibilityHint="Captures image and describes it"
  accessibilityRole="button"
  onPress={handlePress}
>
  <Text>Capture</Text>
</TouchableOpacity>
PropPurpose
accessibleGroups children as single element
accessibilityLabelScreen reader text
accessibilityHintDescribes result of action
accessibilityRoleSemantic type (button, link, image)

Common Hooks

// Dimensions
import { useWindowDimensions } from 'react-native';
const { width, height } = useWindowDimensions();

// App State (foreground/background)
import { useAppState } from '@react-native-community/hooks';
const appState = useAppState(); // 'active' | 'background' | 'inactive'

// Keyboard
import { useKeyboard } from '@react-native-community/hooks';
const { keyboardShown, keyboardHeight } = useKeyboard();

Commands

# Run on iOS
npx react-native run-ios

# Run on Android
npx react-native run-android

# Clear cache
npx react-native start --reset-cache

# Link native dependencies (pre-0.60)
npx react-native link

# Check for issues
npx react-native doctor

Anti-patterns

Don'tDo
<ScrollView> for long lists<FlatList> or <SectionList>
Inline functions in renderuseCallback or class methods
Direct state mutationsetState with new object/array
Ignoring keyboardKeyboardAvoidingView or hooks
Hardcoded dimensionsuseWindowDimensions, flex, %

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon