All skills

Guidelines for upgrading Expo SDK versions and fixing dependency issues

Use this Skill: https://skilld.dev/gh/gigs-slc/react-native-skills/upgrading-expo

This session only. Nothing lands on disk.

referencesreact-compiler.md

≈412 tokens on demand. Your agent reads this file only when SKILL.md points to it.

React Compiler

React Compiler is stable in Expo SDK 54 and later. It automatically memoizes components and hooks, eliminating the need for manual useMemo, useCallback, and React.memo.

Enabling React Compiler

Add to app.json:

{
  "expo": {
    "experiments": {
      "reactCompiler": true
    }
  }
}

What React Compiler Does

  • Automatically memoizes components and values
  • Eliminates unnecessary re-renders
  • Removes the need for manual useMemo and useCallback
  • Works with existing code without modifications

Cleanup After Enabling

Once React Compiler is enabled, you can remove manual memoization:

// Before (manual memoization)
const memoizedValue = useMemo(() => computeExpensive(a, b), [a, b]);
const memoizedCallback = useCallback(() => doSomething(a), [a]);
const MemoizedComponent = React.memo(MyComponent);

// After (React Compiler handles it)
const value = computeExpensive(a, b);
const callback = () => doSomething(a);
// Just use MyComponent directly

Requirements

  • Expo SDK 54 or later
  • New Architecture enabled (default in SDK 54+)

Verifying It's Working

React Compiler runs at build time. Check the Metro bundler output for compilation messages. You can also use React DevTools to verify components are being optimized.

Troubleshooting

If you encounter issues:

  1. Ensure New Architecture is enabled
  2. Clear Metro cache: npx expo start --clear
  3. Check for incompatible patterns in your code (rare)

React Compiler is designed to work with idiomatic React code. If it can't safely optimize a component, it skips that component without breaking your app.

Source: SKILL.md on GitHub

2 warnings6mo4 checks · Risk MEDIUM
  • Gen Agent Trust Hub7mo

    The skill provides comprehensive instructions for upgrading Expo SDK projects. However, it includes a command referencing an unverified third-party tool ('xcobra') which poses a security risk through the execution of untrusted code via bunx.

  • Socket6mo

    No alerts

  • Snyk7mo

    Risk: LOW · No issues

  • Runlayer7mo

    1/4 files flagged

Signed by skilld at 1d299ca. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Dormantupdated 8 months ago
version
1.0.0

README badge

README badge for gigs-slc/react-native-skills/upgrading-expo