@codyswann/lisa 2.111.0 → 2.112.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.mcp.json +3 -3
- package/plugins/lisa-expo/THIRD-PARTY-NOTICES.md +57 -0
- package/plugins/lisa-expo/skills/add-app-clip/SKILL.md +280 -0
- package/plugins/lisa-expo/skills/add-app-clip/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/add-app-clip/references/native-module.md +96 -0
- package/plugins/lisa-expo/skills/building-native-ui/SKILL.md +321 -0
- package/plugins/lisa-expo/skills/building-native-ui/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/animations.md +220 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/controls.md +272 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/form-sheet.md +253 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/gradients.md +106 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/icons.md +213 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/media.md +198 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/route-structure.md +229 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/search.md +248 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/storage.md +121 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/tabs.md +433 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/toolbar-and-headers.md +284 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/visual-effects.md +197 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/webgpu-three.md +605 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/zoom-transitions.md +158 -0
- package/plugins/lisa-expo/skills/eas-update-insights/SKILL.md +228 -0
- package/plugins/lisa-expo/skills/eas-update-insights/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/eas-update-insights/references/channel-insights-schema.md +47 -0
- package/plugins/lisa-expo/skills/eas-update-insights/references/update-insights-schema.md +69 -0
- package/plugins/lisa-expo/skills/expo-api-routes/SKILL.md +369 -0
- package/plugins/lisa-expo/skills/expo-api-routes/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-brownfield/SKILL.md +54 -0
- package/plugins/lisa-expo/skills/expo-brownfield/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-brownfield/references/brownfield-integrated.md +526 -0
- package/plugins/lisa-expo/skills/expo-brownfield/references/brownfield-isolated.md +402 -0
- package/plugins/lisa-expo/skills/expo-brownfield/references/comparison.md +63 -0
- package/plugins/lisa-expo/skills/expo-brownfield/references/troubleshooting.md +88 -0
- package/plugins/lisa-expo/skills/expo-cicd-workflows/SKILL.md +92 -0
- package/plugins/lisa-expo/skills/expo-cicd-workflows/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-cicd-workflows/scripts/fetch.js +113 -0
- package/plugins/lisa-expo/skills/expo-cicd-workflows/scripts/package.json +11 -0
- package/plugins/lisa-expo/skills/expo-cicd-workflows/scripts/validate.js +85 -0
- package/plugins/lisa-expo/skills/expo-deployment/SKILL.md +190 -0
- package/plugins/lisa-expo/skills/expo-deployment/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-deployment/references/app-store-metadata.md +479 -0
- package/plugins/lisa-expo/skills/expo-deployment/references/ios-app-store.md +355 -0
- package/plugins/lisa-expo/skills/expo-deployment/references/play-store.md +246 -0
- package/plugins/lisa-expo/skills/expo-deployment/references/testflight.md +58 -0
- package/plugins/lisa-expo/skills/expo-deployment/references/workflows.md +200 -0
- package/plugins/lisa-expo/skills/expo-dev-client/SKILL.md +164 -0
- package/plugins/lisa-expo/skills/expo-dev-client/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-module/SKILL.md +141 -0
- package/plugins/lisa-expo/skills/expo-module/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-module/references/config-plugin.md +90 -0
- package/plugins/lisa-expo/skills/expo-module/references/create-expo-module.md +206 -0
- package/plugins/lisa-expo/skills/expo-module/references/lifecycle.md +127 -0
- package/plugins/lisa-expo/skills/expo-module/references/module-config.md +48 -0
- package/plugins/lisa-expo/skills/expo-module/references/native-module.md +286 -0
- package/plugins/lisa-expo/skills/expo-module/references/native-view.md +171 -0
- package/plugins/lisa-expo/skills/expo-tailwind-setup/SKILL.md +480 -0
- package/plugins/lisa-expo/skills/expo-tailwind-setup/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-ui-jetpack-compose/SKILL.md +40 -0
- package/plugins/lisa-expo/skills/expo-ui-jetpack-compose/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-ui-swift-ui/SKILL.md +39 -0
- package/plugins/lisa-expo/skills/expo-ui-swift-ui/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/native-data-fetching/SKILL.md +507 -0
- package/plugins/lisa-expo/skills/native-data-fetching/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/native-data-fetching/references/expo-router-loaders.md +344 -0
- package/plugins/lisa-expo/skills/upgrading-expo/SKILL.md +134 -0
- package/plugins/lisa-expo/skills/upgrading-expo/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/expo-av-to-audio.md +132 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/expo-av-to-video.md +160 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/native-tabs.md +124 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/new-architecture.md +79 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/react-19.md +79 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/react-compiler.md +59 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/react-navigation-to-expo-router.md +61 -0
- package/plugins/lisa-expo/skills/use-dom/SKILL.md +417 -0
- package/plugins/lisa-expo/skills/use-dom/agents/openai.yaml +4 -0
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/src/expo/.mcp.json +3 -3
- package/plugins/src/expo/THIRD-PARTY-NOTICES.md +57 -0
- package/plugins/src/expo/skills/add-app-clip/SKILL.md +280 -0
- package/plugins/src/expo/skills/add-app-clip/references/native-module.md +96 -0
- package/plugins/src/expo/skills/building-native-ui/SKILL.md +321 -0
- package/plugins/src/expo/skills/building-native-ui/references/animations.md +220 -0
- package/plugins/src/expo/skills/building-native-ui/references/controls.md +272 -0
- package/plugins/src/expo/skills/building-native-ui/references/form-sheet.md +253 -0
- package/plugins/src/expo/skills/building-native-ui/references/gradients.md +106 -0
- package/plugins/src/expo/skills/building-native-ui/references/icons.md +213 -0
- package/plugins/src/expo/skills/building-native-ui/references/media.md +198 -0
- package/plugins/src/expo/skills/building-native-ui/references/route-structure.md +229 -0
- package/plugins/src/expo/skills/building-native-ui/references/search.md +248 -0
- package/plugins/src/expo/skills/building-native-ui/references/storage.md +121 -0
- package/plugins/src/expo/skills/building-native-ui/references/tabs.md +433 -0
- package/plugins/src/expo/skills/building-native-ui/references/toolbar-and-headers.md +284 -0
- package/plugins/src/expo/skills/building-native-ui/references/visual-effects.md +197 -0
- package/plugins/src/expo/skills/building-native-ui/references/webgpu-three.md +605 -0
- package/plugins/src/expo/skills/building-native-ui/references/zoom-transitions.md +158 -0
- package/plugins/src/expo/skills/eas-update-insights/SKILL.md +228 -0
- package/plugins/src/expo/skills/eas-update-insights/references/channel-insights-schema.md +47 -0
- package/plugins/src/expo/skills/eas-update-insights/references/update-insights-schema.md +69 -0
- package/plugins/src/expo/skills/expo-api-routes/SKILL.md +369 -0
- package/plugins/src/expo/skills/expo-brownfield/SKILL.md +54 -0
- package/plugins/src/expo/skills/expo-brownfield/references/brownfield-integrated.md +526 -0
- package/plugins/src/expo/skills/expo-brownfield/references/brownfield-isolated.md +402 -0
- package/plugins/src/expo/skills/expo-brownfield/references/comparison.md +63 -0
- package/plugins/src/expo/skills/expo-brownfield/references/troubleshooting.md +88 -0
- package/plugins/src/expo/skills/expo-cicd-workflows/SKILL.md +92 -0
- package/plugins/src/expo/skills/expo-cicd-workflows/scripts/fetch.js +113 -0
- package/plugins/src/expo/skills/expo-cicd-workflows/scripts/package.json +11 -0
- package/plugins/src/expo/skills/expo-cicd-workflows/scripts/validate.js +85 -0
- package/plugins/src/expo/skills/expo-deployment/SKILL.md +190 -0
- package/plugins/src/expo/skills/expo-deployment/references/app-store-metadata.md +479 -0
- package/plugins/src/expo/skills/expo-deployment/references/ios-app-store.md +355 -0
- package/plugins/src/expo/skills/expo-deployment/references/play-store.md +246 -0
- package/plugins/src/expo/skills/expo-deployment/references/testflight.md +58 -0
- package/plugins/src/expo/skills/expo-deployment/references/workflows.md +200 -0
- package/plugins/src/expo/skills/expo-dev-client/SKILL.md +164 -0
- package/plugins/src/expo/skills/expo-module/SKILL.md +141 -0
- package/plugins/src/expo/skills/expo-module/references/config-plugin.md +90 -0
- package/plugins/src/expo/skills/expo-module/references/create-expo-module.md +206 -0
- package/plugins/src/expo/skills/expo-module/references/lifecycle.md +127 -0
- package/plugins/src/expo/skills/expo-module/references/module-config.md +48 -0
- package/plugins/src/expo/skills/expo-module/references/native-module.md +286 -0
- package/plugins/src/expo/skills/expo-module/references/native-view.md +171 -0
- package/plugins/src/expo/skills/expo-tailwind-setup/SKILL.md +480 -0
- package/plugins/src/expo/skills/expo-ui-jetpack-compose/SKILL.md +40 -0
- package/plugins/src/expo/skills/expo-ui-swift-ui/SKILL.md +39 -0
- package/plugins/src/expo/skills/native-data-fetching/SKILL.md +507 -0
- package/plugins/src/expo/skills/native-data-fetching/references/expo-router-loaders.md +344 -0
- package/plugins/src/expo/skills/upgrading-expo/SKILL.md +134 -0
- package/plugins/src/expo/skills/upgrading-expo/references/expo-av-to-audio.md +132 -0
- package/plugins/src/expo/skills/upgrading-expo/references/expo-av-to-video.md +160 -0
- package/plugins/src/expo/skills/upgrading-expo/references/native-tabs.md +124 -0
- package/plugins/src/expo/skills/upgrading-expo/references/new-architecture.md +79 -0
- package/plugins/src/expo/skills/upgrading-expo/references/react-19.md +79 -0
- package/plugins/src/expo/skills/upgrading-expo/references/react-compiler.md +59 -0
- package/plugins/src/expo/skills/upgrading-expo/references/react-navigation-to-expo-router.md +61 -0
- package/plugins/src/expo/skills/use-dom/SKILL.md +417 -0
- package/scripts/generate-codex-plugin-artifacts.mjs +7 -2
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Migrating from expo-av to expo-video
|
|
2
|
+
|
|
3
|
+
## Imports
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
// Before
|
|
7
|
+
import { Video, ResizeMode } from 'expo-av';
|
|
8
|
+
|
|
9
|
+
// After
|
|
10
|
+
import { useVideoPlayer, VideoView, VideoSource } from 'expo-video';
|
|
11
|
+
import { useEvent, useEventListener } from 'expo';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Video Playback
|
|
15
|
+
|
|
16
|
+
### Before (expo-av)
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
const videoRef = useRef<Video>(null);
|
|
20
|
+
const [status, setStatus] = useState({});
|
|
21
|
+
|
|
22
|
+
<Video
|
|
23
|
+
ref={videoRef}
|
|
24
|
+
source={{ uri: 'https://example.com/video.mp4' }}
|
|
25
|
+
style={{ width: 350, height: 200 }}
|
|
26
|
+
resizeMode={ResizeMode.CONTAIN}
|
|
27
|
+
isLooping
|
|
28
|
+
onPlaybackStatusUpdate={setStatus}
|
|
29
|
+
/>
|
|
30
|
+
|
|
31
|
+
// Control
|
|
32
|
+
videoRef.current?.playAsync();
|
|
33
|
+
videoRef.current?.pauseAsync();
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### After (expo-video)
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
const player = useVideoPlayer('https://example.com/video.mp4', player => {
|
|
40
|
+
player.loop = true;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const { isPlaying } = useEvent(player, 'playingChange', { isPlaying: player.playing });
|
|
44
|
+
|
|
45
|
+
<VideoView
|
|
46
|
+
player={player}
|
|
47
|
+
style={{ width: 350, height: 200 }}
|
|
48
|
+
contentFit="contain"
|
|
49
|
+
/>
|
|
50
|
+
|
|
51
|
+
// Control
|
|
52
|
+
player.play();
|
|
53
|
+
player.pause();
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Status Updates
|
|
57
|
+
|
|
58
|
+
### Before (expo-av)
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
<Video
|
|
62
|
+
onPlaybackStatusUpdate={status => {
|
|
63
|
+
if (status.isLoaded) {
|
|
64
|
+
console.log(status.positionMillis, status.durationMillis, status.isPlaying);
|
|
65
|
+
if (status.didJustFinish) console.log('finished');
|
|
66
|
+
}
|
|
67
|
+
}}
|
|
68
|
+
/>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### After (expo-video)
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
// Reactive state
|
|
75
|
+
const { isPlaying } = useEvent(player, 'playingChange', { isPlaying: player.playing });
|
|
76
|
+
|
|
77
|
+
// Side effects
|
|
78
|
+
useEventListener(player, 'playToEnd', () => console.log('finished'));
|
|
79
|
+
|
|
80
|
+
// Direct access
|
|
81
|
+
console.log(player.currentTime, player.duration, player.playing);
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Local Files
|
|
85
|
+
|
|
86
|
+
### Before (expo-av)
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
<Video source={require('./video.mp4')} />
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### After (expo-video)
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
const player = useVideoPlayer({ assetId: require('./video.mp4') });
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Fullscreen and PiP
|
|
99
|
+
|
|
100
|
+
```tsx
|
|
101
|
+
<VideoView
|
|
102
|
+
player={player}
|
|
103
|
+
allowsFullscreen
|
|
104
|
+
allowsPictureInPicture
|
|
105
|
+
onFullscreenEnter={() => {}}
|
|
106
|
+
onFullscreenExit={() => {}}
|
|
107
|
+
/>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
For PiP and background playback, add to app.json:
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"expo": {
|
|
115
|
+
"plugins": [
|
|
116
|
+
["expo-video", { "supportsBackgroundPlayback": true, "supportsPictureInPicture": true }]
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## API Mapping
|
|
123
|
+
|
|
124
|
+
| expo-av | expo-video |
|
|
125
|
+
|---------|------------|
|
|
126
|
+
| `<Video>` | `<VideoView>` |
|
|
127
|
+
| `ref={videoRef}` | `player={useVideoPlayer()}` |
|
|
128
|
+
| `source={{ uri }}` | Pass to `useVideoPlayer(uri)` |
|
|
129
|
+
| `resizeMode={ResizeMode.CONTAIN}` | `contentFit="contain"` |
|
|
130
|
+
| `isLooping` | `player.loop = true` |
|
|
131
|
+
| `shouldPlay` | `player.play()` in setup |
|
|
132
|
+
| `isMuted` | `player.muted = true` |
|
|
133
|
+
| `useNativeControls` | `nativeControls={true}` |
|
|
134
|
+
| `onPlaybackStatusUpdate` | `useEvent` / `useEventListener` |
|
|
135
|
+
| `videoRef.current.playAsync()` | `player.play()` |
|
|
136
|
+
| `videoRef.current.pauseAsync()` | `player.pause()` |
|
|
137
|
+
| `videoRef.current.replayAsync()` | `player.replay()` |
|
|
138
|
+
| `videoRef.current.setPositionAsync(ms)` | `player.currentTime = seconds` |
|
|
139
|
+
| `status.positionMillis` | `player.currentTime` (seconds) |
|
|
140
|
+
| `status.durationMillis` | `player.duration` (seconds) |
|
|
141
|
+
| `status.didJustFinish` | `useEventListener(player, 'playToEnd')` |
|
|
142
|
+
|
|
143
|
+
## Key Differences
|
|
144
|
+
|
|
145
|
+
- **Separate player and view**: Player logic decoupled from the view—one player can be used across multiple views
|
|
146
|
+
- **Time in seconds**: Uses seconds, not milliseconds
|
|
147
|
+
- **Event system**: Uses `useEvent`/`useEventListener` from `expo` instead of callback props
|
|
148
|
+
- **Video preloading**: Create a player without mounting a VideoView to preload for faster transitions
|
|
149
|
+
- **Built-in caching**: Set `useCaching: true` in VideoSource for persistent offline caching
|
|
150
|
+
|
|
151
|
+
## Known Issues
|
|
152
|
+
|
|
153
|
+
- **Uninstall expo-av first**: On Android, having both expo-av and expo-video installed can cause VideoView to show a black screen. Uninstall expo-av before installing expo-video
|
|
154
|
+
- **Android: Reusing players**: Mounting the same player in multiple VideoViews simultaneously can cause black screens on Android (works on iOS)
|
|
155
|
+
- **Android: currentTime in setup**: Setting `player.currentTime` in the `useVideoPlayer` setup callback may not work on Android—set it after mount instead
|
|
156
|
+
- **Changing source**: Use `player.replace(newSource)` to change videos without recreating the player
|
|
157
|
+
|
|
158
|
+
## API Reference
|
|
159
|
+
|
|
160
|
+
https://docs.expo.dev/versions/latest/sdk/video/
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Native Tabs Migration (SDK 55)
|
|
2
|
+
|
|
3
|
+
In SDK 55, `Label`, `Icon`, `Badge`, and `VectorIcon` are now accessed as static properties on `NativeTabs.Trigger` rather than separate imports.
|
|
4
|
+
|
|
5
|
+
## Import Changes
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
// SDK 53/54
|
|
9
|
+
import {
|
|
10
|
+
NativeTabs,
|
|
11
|
+
Icon,
|
|
12
|
+
Label,
|
|
13
|
+
Badge,
|
|
14
|
+
VectorIcon,
|
|
15
|
+
} from "expo-router/unstable-native-tabs";
|
|
16
|
+
|
|
17
|
+
// SDK 55+
|
|
18
|
+
import { NativeTabs } from "expo-router/unstable-native-tabs";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Component Changes
|
|
22
|
+
|
|
23
|
+
| SDK 53/54 | SDK 55+ |
|
|
24
|
+
| ---------------- | ----------------------------------- |
|
|
25
|
+
| `<Icon />` | `<NativeTabs.Trigger.Icon />` |
|
|
26
|
+
| `<Label />` | `<NativeTabs.Trigger.Label />` |
|
|
27
|
+
| `<Badge />` | `<NativeTabs.Trigger.Badge />` |
|
|
28
|
+
| `<VectorIcon />` | `<NativeTabs.Trigger.VectorIcon />` |
|
|
29
|
+
| (n/a) | `<NativeTabs.BottomAccessory />` |
|
|
30
|
+
|
|
31
|
+
## New in SDK 55
|
|
32
|
+
|
|
33
|
+
### BottomAccessory
|
|
34
|
+
|
|
35
|
+
New component for Apple Music-style mini players on iOS 26+ that float above the tab bar:
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
<NativeTabs>
|
|
39
|
+
<NativeTabs.BottomAccessory>
|
|
40
|
+
{/* Content above tabs */}
|
|
41
|
+
</NativeTabs.BottomAccessory>
|
|
42
|
+
<NativeTabs.Trigger name="(index)">
|
|
43
|
+
<NativeTabs.Trigger.Label>Home</NativeTabs.Trigger.Label>
|
|
44
|
+
</NativeTabs.Trigger>
|
|
45
|
+
</NativeTabs>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
On Android and web, this component will render as a no-op. Position a view absolutely above the tab bar instead.
|
|
49
|
+
|
|
50
|
+
### Icon `md` Prop
|
|
51
|
+
|
|
52
|
+
New `md` prop for Material icon glyphs on Android (alongside existing `drawable`):
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
<NativeTabs.Trigger.Icon sf="house" md="home" />
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Full Migration Example
|
|
59
|
+
|
|
60
|
+
### Before (SDK 53/54)
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
import {
|
|
64
|
+
NativeTabs,
|
|
65
|
+
Icon,
|
|
66
|
+
Label,
|
|
67
|
+
Badge,
|
|
68
|
+
} from "expo-router/unstable-native-tabs";
|
|
69
|
+
|
|
70
|
+
export default function TabLayout() {
|
|
71
|
+
return (
|
|
72
|
+
<NativeTabs minimizeBehavior="onScrollDown">
|
|
73
|
+
<NativeTabs.Trigger name="(index)">
|
|
74
|
+
<Label>Home</Label>
|
|
75
|
+
<Icon sf="house.fill" />
|
|
76
|
+
<Badge>3</Badge>
|
|
77
|
+
</NativeTabs.Trigger>
|
|
78
|
+
<NativeTabs.Trigger name="(settings)">
|
|
79
|
+
<Label>Settings</Label>
|
|
80
|
+
<Icon sf="gear" />
|
|
81
|
+
</NativeTabs.Trigger>
|
|
82
|
+
<NativeTabs.Trigger name="(search)" role="search">
|
|
83
|
+
<Label>Search</Label>
|
|
84
|
+
</NativeTabs.Trigger>
|
|
85
|
+
</NativeTabs>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### After (SDK 55+)
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
import { NativeTabs } from "expo-router/unstable-native-tabs";
|
|
94
|
+
|
|
95
|
+
export default function TabLayout() {
|
|
96
|
+
return (
|
|
97
|
+
<NativeTabs minimizeBehavior="onScrollDown">
|
|
98
|
+
<NativeTabs.Trigger name="(index)">
|
|
99
|
+
<NativeTabs.Trigger.Label>Home</NativeTabs.Trigger.Label>
|
|
100
|
+
<NativeTabs.Trigger.Icon sf="house.fill" md="home" />
|
|
101
|
+
<NativeTabs.Trigger.Badge>3</NativeTabs.Trigger.Badge>
|
|
102
|
+
</NativeTabs.Trigger>
|
|
103
|
+
<NativeTabs.Trigger name="(settings)">
|
|
104
|
+
<NativeTabs.Trigger.Label>Settings</NativeTabs.Trigger.Label>
|
|
105
|
+
<NativeTabs.Trigger.Icon sf="gear" md="settings" />
|
|
106
|
+
</NativeTabs.Trigger>
|
|
107
|
+
<NativeTabs.Trigger name="(search)" role="search">
|
|
108
|
+
<NativeTabs.Trigger.Label>Search</NativeTabs.Trigger.Label>
|
|
109
|
+
</NativeTabs.Trigger>
|
|
110
|
+
</NativeTabs>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Migration Checklist
|
|
116
|
+
|
|
117
|
+
1. Remove `Icon`, `Label`, `Badge`, `VectorIcon` from imports
|
|
118
|
+
2. Keep only `NativeTabs` import from `expo-router/unstable-native-tabs`
|
|
119
|
+
3. Replace `<Icon />` with `<NativeTabs.Trigger.Icon />`
|
|
120
|
+
4. Replace `<Label />` with `<NativeTabs.Trigger.Label />`
|
|
121
|
+
5. Replace `<Badge />` with `<NativeTabs.Trigger.Badge />`
|
|
122
|
+
6. Replace `<VectorIcon />` with `<NativeTabs.Trigger.VectorIcon />`
|
|
123
|
+
|
|
124
|
+
- Read docs for more info https://docs.expo.dev/versions/v55.0.0/sdk/router-native-tabs/
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# New Architecture
|
|
2
|
+
|
|
3
|
+
The New Architecture is enabled by default in Expo SDK 53+. It replaces the legacy bridge with a faster, synchronous communication layer between JavaScript and native code.
|
|
4
|
+
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
Full guide: https://docs.expo.dev/guides/new-architecture/
|
|
8
|
+
|
|
9
|
+
## What Changed
|
|
10
|
+
|
|
11
|
+
- **JSI (JavaScript Interface)** — Direct synchronous calls between JS and native
|
|
12
|
+
- **Fabric** — New rendering system with concurrent features
|
|
13
|
+
- **TurboModules** — Lazy-loaded native modules with type safety
|
|
14
|
+
|
|
15
|
+
## SDK Compatibility
|
|
16
|
+
|
|
17
|
+
| SDK Version | New Architecture Status |
|
|
18
|
+
| ----------- | ----------------------- |
|
|
19
|
+
| SDK 53+ | Enabled by default |
|
|
20
|
+
| SDK 52 | Opt-in via app.json |
|
|
21
|
+
| SDK 51- | Experimental |
|
|
22
|
+
|
|
23
|
+
## Configuration
|
|
24
|
+
|
|
25
|
+
New Architecture is enabled by default. To explicitly disable (not recommended):
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"expo": {
|
|
30
|
+
"newArchEnabled": false
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Expo Go
|
|
36
|
+
|
|
37
|
+
Expo Go only supports the New Architecture as of SDK 53. Apps using the old architecture must use development builds.
|
|
38
|
+
|
|
39
|
+
## Common Migration Issues
|
|
40
|
+
|
|
41
|
+
### Native Module Compatibility
|
|
42
|
+
|
|
43
|
+
Some older native modules may not support the New Architecture. Check:
|
|
44
|
+
|
|
45
|
+
1. Module documentation for New Architecture support
|
|
46
|
+
2. GitHub issues for compatibility discussions
|
|
47
|
+
3. Consider alternatives if module is unmaintained
|
|
48
|
+
|
|
49
|
+
### Reanimated
|
|
50
|
+
|
|
51
|
+
React Native Reanimated requires `react-native-worklets` in SDK 54+:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx expo install react-native-worklets
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Layout Animations
|
|
58
|
+
|
|
59
|
+
Some layout animations behave differently. Test thoroughly after upgrading.
|
|
60
|
+
|
|
61
|
+
## Verifying New Architecture
|
|
62
|
+
|
|
63
|
+
Check if New Architecture is active:
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
import { Platform } from "react-native";
|
|
67
|
+
|
|
68
|
+
// Returns true if Fabric is enabled
|
|
69
|
+
const isNewArch = global._IS_FABRIC !== undefined;
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Verify from the command line if the currently running app uses the New Architecture: `bunx xcobra expo eval "_IS_FABRIC"` -> `true`
|
|
73
|
+
|
|
74
|
+
## Troubleshooting
|
|
75
|
+
|
|
76
|
+
1. **Clear caches** — `npx expo start --clear`
|
|
77
|
+
2. **Clean prebuild** — `npx expo prebuild --clean`
|
|
78
|
+
3. **Check native modules** — Ensure all dependencies support New Architecture
|
|
79
|
+
4. **Review console warnings** — Legacy modules log compatibility warnings
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# React 19
|
|
2
|
+
|
|
3
|
+
React 19 is included in Expo SDK 54. This release simplifies several common patterns.
|
|
4
|
+
|
|
5
|
+
## Context Changes
|
|
6
|
+
|
|
7
|
+
### useContext → use
|
|
8
|
+
|
|
9
|
+
The `use` hook replaces `useContext`:
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
// Before (React 18)
|
|
13
|
+
import { useContext } from "react";
|
|
14
|
+
const value = useContext(MyContext);
|
|
15
|
+
|
|
16
|
+
// After (React 19)
|
|
17
|
+
import { use } from "react";
|
|
18
|
+
const value = use(MyContext);
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- The `use` hook can also read promises, enabling Suspense-based data fetching.
|
|
22
|
+
- `use` can be called conditionally, this simplifies components that consume multiple contexts.
|
|
23
|
+
|
|
24
|
+
### Context.Provider → Context
|
|
25
|
+
|
|
26
|
+
Context providers no longer need the `.Provider` suffix:
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
// Before (React 18)
|
|
30
|
+
<ThemeContext.Provider value={theme}>
|
|
31
|
+
{children}
|
|
32
|
+
</ThemeContext.Provider>
|
|
33
|
+
|
|
34
|
+
// After (React 19)
|
|
35
|
+
<ThemeContext value={theme}>
|
|
36
|
+
{children}
|
|
37
|
+
</ThemeContext>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## ref as a Prop
|
|
41
|
+
|
|
42
|
+
### Removing forwardRef
|
|
43
|
+
|
|
44
|
+
Components can now receive `ref` as a regular prop. `forwardRef` is no longer needed:
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
// Before (React 18)
|
|
48
|
+
import { forwardRef } from "react";
|
|
49
|
+
|
|
50
|
+
const Input = forwardRef<TextInput, Props>((props, ref) => {
|
|
51
|
+
return <TextInput ref={ref} {...props} />;
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// After (React 19)
|
|
55
|
+
function Input({ ref, ...props }: Props & { ref?: React.Ref<TextInput> }) {
|
|
56
|
+
return <TextInput ref={ref} {...props} />;
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Migration Steps
|
|
61
|
+
|
|
62
|
+
1. Remove `forwardRef` wrapper
|
|
63
|
+
2. Add `ref` to the props destructuring
|
|
64
|
+
3. Update the type to include `ref?: React.Ref<T>`
|
|
65
|
+
|
|
66
|
+
## Other React 19 Features
|
|
67
|
+
|
|
68
|
+
- **Actions** — Functions that handle async transitions
|
|
69
|
+
- **useOptimistic** — Optimistic UI updates
|
|
70
|
+
- **useFormStatus** — Form submission state (web)
|
|
71
|
+
- **Document Metadata** — Native `<title>` and `<meta>` support (web)
|
|
72
|
+
|
|
73
|
+
## Cleanup Checklist
|
|
74
|
+
|
|
75
|
+
When upgrading to SDK 54:
|
|
76
|
+
|
|
77
|
+
- [ ] Replace `useContext` with `use`
|
|
78
|
+
- [ ] Remove `.Provider` from Context components
|
|
79
|
+
- [ ] Remove `forwardRef` wrappers, use `ref` prop instead
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# React Compiler
|
|
2
|
+
|
|
3
|
+
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`.
|
|
4
|
+
|
|
5
|
+
## Enabling React Compiler
|
|
6
|
+
|
|
7
|
+
Add to `app.json`:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"expo": {
|
|
12
|
+
"experiments": {
|
|
13
|
+
"reactCompiler": true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## What React Compiler Does
|
|
20
|
+
|
|
21
|
+
- Automatically memoizes components and values
|
|
22
|
+
- Eliminates unnecessary re-renders
|
|
23
|
+
- Removes the need for manual `useMemo` and `useCallback`
|
|
24
|
+
- Works with existing code without modifications
|
|
25
|
+
|
|
26
|
+
## Cleanup After Enabling
|
|
27
|
+
|
|
28
|
+
Once React Compiler is enabled, you can remove manual memoization:
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
// Before (manual memoization)
|
|
32
|
+
const memoizedValue = useMemo(() => computeExpensive(a, b), [a, b]);
|
|
33
|
+
const memoizedCallback = useCallback(() => doSomething(a), [a]);
|
|
34
|
+
const MemoizedComponent = React.memo(MyComponent);
|
|
35
|
+
|
|
36
|
+
// After (React Compiler handles it)
|
|
37
|
+
const value = computeExpensive(a, b);
|
|
38
|
+
const callback = () => doSomething(a);
|
|
39
|
+
// Just use MyComponent directly
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Requirements
|
|
43
|
+
|
|
44
|
+
- Expo SDK 54 or later
|
|
45
|
+
- New Architecture enabled (default in SDK 54+)
|
|
46
|
+
|
|
47
|
+
## Verifying It's Working
|
|
48
|
+
|
|
49
|
+
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.
|
|
50
|
+
|
|
51
|
+
## Troubleshooting
|
|
52
|
+
|
|
53
|
+
If you encounter issues:
|
|
54
|
+
|
|
55
|
+
1. Ensure New Architecture is enabled
|
|
56
|
+
2. Clear Metro cache: `npx expo start --clear`
|
|
57
|
+
3. Check for incompatible patterns in your code (rare)
|
|
58
|
+
|
|
59
|
+
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.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Migrating from react-navigation to expo-router
|
|
2
|
+
|
|
3
|
+
In SDK 56+, application code must not import from `@react-navigation/*` directly. Repoint those imports to the matching `expo-router` entry points. Runtime API is unchanged — only the module specifiers move.
|
|
4
|
+
|
|
5
|
+
## Steps
|
|
6
|
+
|
|
7
|
+
1. Prefer the automated codemod (see below). If it is not viable, fall back to the manual mapping.
|
|
8
|
+
2. Replace imports using the table. Use the entry point that matches the `@react-navigation/*` source.
|
|
9
|
+
3. After rewriting, check whether any of the rewritten imports are deprecated in `expo-router` (see [Check for deprecated imports](#check-for-deprecated-imports)). If so, surface the deprecation reason and the suggested replacement to the user before continuing.
|
|
10
|
+
4. Validate: search for remaining `@react-navigation/` references in source files, then run typecheck/build/start.
|
|
11
|
+
5. Remove `@react-navigation/*` packages that are no longer imported from `package.json` and reinstall (delete `node_modules` if needed).
|
|
12
|
+
|
|
13
|
+
## Automated migration (preferred)
|
|
14
|
+
|
|
15
|
+
Run from the project root over your application code (replace `src` with the actual directory or glob):
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npx expo-codemod sdk-56-expo-router-react-navigation-replace src
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npx expo-codemod sdk-56-expo-router-react-navigation-replace '**/*.{ts,tsx,js,jsx}'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Manual API mapping
|
|
26
|
+
|
|
27
|
+
| React Navigation source | Expo Router target |
|
|
28
|
+
| ------------------------------------- | ------------------------------------------------------------------------ |
|
|
29
|
+
| `@react-navigation/native` | `expo-router/react-navigation` |
|
|
30
|
+
| `@react-navigation/core` | `expo-router/react-navigation` |
|
|
31
|
+
| `@react-navigation/elements` | `expo-router/react-navigation` |
|
|
32
|
+
| `@react-navigation/routers` | `expo-router/react-navigation` |
|
|
33
|
+
| `@react-navigation/stack` | `expo-router/js-stack` |
|
|
34
|
+
| `@react-navigation/bottom-tabs` | `expo-router/js-tabs` |
|
|
35
|
+
| `@react-navigation/material-top-tabs` | `expo-router/js-top-tabs` |
|
|
36
|
+
| `@react-navigation/native-stack` | No direct equivalent. Use the `Stack` layout from `expo-router` instead. |
|
|
37
|
+
|
|
38
|
+
**Stack caveat:** Do NOT rewrite `import { Stack } from "expo-router"` to `expo-router/js-stack`. The root `Stack` is the Expo Router layout component used in route files; only use `expo-router/js-stack` when replacing a `@react-navigation/stack` JS stack navigator.
|
|
39
|
+
|
|
40
|
+
If you encounter a symbol that has no replacement, ask the user to file an issue in the `expo/expo` repository describing what is needed and why.
|
|
41
|
+
|
|
42
|
+
## Check for deprecated imports
|
|
43
|
+
|
|
44
|
+
A successful rewrite to `expo-router/*` does not guarantee the new import is the recommended one. Some symbols are re-exported as deprecated shims and the project may need to migrate further (for example, to a different `expo-router` API or to a first-party Expo package).
|
|
45
|
+
|
|
46
|
+
For each symbol rewritten in step 2:
|
|
47
|
+
|
|
48
|
+
1. Resolve the rewritten module to its source in `node_modules` (e.g., `node_modules/expo-router/build/react-navigation.d.ts`, `js-stack`, `js-tabs`, `js-top-tabs`).
|
|
49
|
+
2. Look for a `@deprecated` JSDoc tag on the named export, or a runtime deprecation warning in the implementation file.
|
|
50
|
+
3. If deprecated, capture both the reason and the recommended replacement from the JSDoc/comment.
|
|
51
|
+
4. Report each deprecated symbol to the user with: the import path, the symbol, the deprecation reason, and the suggested replacement. Wait for the user to confirm before mass-applying further changes.
|
|
52
|
+
|
|
53
|
+
## Done when
|
|
54
|
+
|
|
55
|
+
1. No `@react-navigation/*` imports remain in source files.
|
|
56
|
+
2. No unused `@react-navigation/*` entries remain in `package.json`.
|
|
57
|
+
3. Typecheck and bundler start without `@react-navigation/*` errors.
|
|
58
|
+
|
|
59
|
+
## Reference
|
|
60
|
+
|
|
61
|
+
- Official Expo Router SDK 55 → 56 migration guide: https://docs.expo.dev/router/migrate/sdk-55-to-56
|