Skip to content

Commit 0937df8

Browse files
computerjazztaniaIasTatiana Iasencova
authored
Port to Reanimated v2 (#335)
* first pass v2 migration * autoscroll (WIP * update decorators, cleanup * ts ignore * tweak constrained hover anim * use single useDerivedValue * fixed layout measurement (#325) Co-authored-by: Tatiana Iasencova <[email protected]> * back to working * fix autoscroll * fix placeholder item * bugfix placeholder * add identityRetainingCallback * enforce reanimated v2 * fix onDragEnd * cleanup * fix filcker (mostly) * flip raf and setTimeout * fix placeholder position * fix filicker, nestable checkpoint * fix nested scroll * remove unnecessary wrapper * fix placeholderitem * cleanup, fix tests * remove fail case * add bob * 4.0.0-beta.0 * memoize, useAnimatedRef -> useRef * memoize, index -> getIndex * memoize * performance, cleanup * update README * fix ref types * 4.0.0-beta.1 * disable gestures when animating * bump reanimated * 4.0.0-beta.2 * fix commonjs build * 4.0.0-beta.3 * prevent flicker on web * use v2 gesture api * no worklet * useIdentityRetainingCallback -> useStableCallback * 4.0.0-beta.4 * foward refs * add example * add npmignore * 4.0.0-beta.5 * fix autoscroll not working after scroll down Co-authored-by: computerjazz <[email protected]> Co-authored-by: taniaI <[email protected]> Co-authored-by: Tatiana Iasencova <[email protected]>
1 parent d8a392b commit 0937df8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+12618
-1811
lines changed

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/Example
2+
/tests

Example/.expo-shared/assets.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"e997a5256149a4b76e6bfd6cbf519c5e5a0f1d278a3d8fa1253022b03c90473b": true,
3+
"af683c96e0ffd2cf81287651c9433fa44debc1220ca7cb431fe482747f34a505": true,
4+
"12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true,
5+
"40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true
6+
}

Example/.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules/
2+
.expo/
3+
dist/
4+
npm-debug.*
5+
*.jks
6+
*.p8
7+
*.p12
8+
*.key
9+
*.mobileprovision
10+
*.orig.*
11+
web-build/
12+
13+
# macOS
14+
.DS_Store

Example/App.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { StatusBar } from "expo-status-bar";
2+
import { SafeAreaProvider } from "react-native-safe-area-context";
3+
4+
import useCachedResources from "./hooks/useCachedResources";
5+
import useColorScheme from "./hooks/useColorScheme";
6+
import Navigation from "./navigation";
7+
8+
export default function App() {
9+
const isLoadingComplete = useCachedResources();
10+
const colorScheme = useColorScheme();
11+
12+
if (!isLoadingComplete) {
13+
return null;
14+
} else {
15+
return (
16+
<SafeAreaProvider>
17+
<Navigation colorScheme={colorScheme} />
18+
<StatusBar />
19+
</SafeAreaProvider>
20+
);
21+
}
22+
}

Example/app.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"expo": {
3+
"name": "Example",
4+
"slug": "Example",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/images/icon.png",
8+
"scheme": "myapp",
9+
"userInterfaceStyle": "automatic",
10+
"splash": {
11+
"image": "./assets/images/splash.png",
12+
"resizeMode": "contain",
13+
"backgroundColor": "#ffffff"
14+
},
15+
"updates": {
16+
"fallbackToCacheTimeout": 0
17+
},
18+
"assetBundlePatterns": ["**/*"],
19+
"ios": {
20+
"supportsTablet": true
21+
},
22+
"android": {
23+
"adaptiveIcon": {
24+
"foregroundImage": "./assets/images/adaptive-icon.png",
25+
"backgroundColor": "#ffffff"
26+
}
27+
},
28+
"web": {
29+
"favicon": "./assets/images/favicon.png"
30+
}
31+
}
32+
}
91.1 KB
Binary file not shown.
17.1 KB
Loading

Example/assets/images/favicon.png

1.43 KB
Loading

Example/assets/images/icon.png

21.9 KB
Loading

Example/assets/images/splash.png

46.2 KB
Loading

0 commit comments

Comments
 (0)