This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Animated, { | |
useSharedValue, | |
useAnimatedReaction, | |
withTiming, | |
useAnimatedStyle, | |
} from 'react-native-reanimated'; | |
import { View, Button, Text } from 'react-native'; | |
import React, { useLayoutEffect, useEffect, useState } from 'react'; | |
function Inner({ sharedCounter, counter }) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Animated, { | |
useSharedValue, | |
useAnimatedReaction, | |
withTiming, | |
useAnimatedStyle, | |
} from 'react-native-reanimated'; | |
import { View, Button, Text } from 'react-native'; | |
import React, { useLayoutEffect, useEffect, useState } from 'react'; | |
function Inner({ sharedList, length }) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ios/REANodesManager.m b/ios/REANodesManager.m | |
index 472ff05ed..7bc0f279e 100644 | |
--- a/ios/REANodesManager.m | |
+++ b/ios/REANodesManager.m | |
@@ -299,11 +299,13 @@ - (void)createNode:(REANodeID)nodeID | |
node.nodesManager = self; | |
node.updateContext = _updateContext; | |
_nodes[nodeID] = node; | |
+ NSLog(@"REANIMATED_BUG CREATE %@ %@", nodeID, node); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/AnimatedNode.js b/src/core/AnimatedNode.js | |
index ac08f2873..819ce0a14 100644 | |
--- a/src/core/AnimatedNode.js | |
+++ b/src/core/AnimatedNode.js | |
@@ -147,6 +147,7 @@ export default class AnimatedNode { | |
__nativeInitialize() { | |
if (!this.__initialized) { | |
+ console.log(`REANIMATED_BUG JS CREATE ${this.__nodeID}`); | |
ReanimatedModule.createNode(this.__nodeID, { ...this.__nodeConfig }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ios/REANodesManager.m b/ios/REANodesManager.m | |
index 472ff05ed..7bc0f279e 100644 | |
--- a/ios/REANodesManager.m | |
+++ b/ios/REANodesManager.m | |
@@ -299,11 +299,13 @@ - (void)createNode:(REANodeID)nodeID | |
node.nodesManager = self; | |
node.updateContext = _updateContext; | |
_nodes[nodeID] = node; | |
+ NSLog(@"REANIMATED_BUG CREATE %@ %@", nodeID, node); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { StyleSheet, Button, View, TextInput } from 'react-native'; | |
import { | |
Screen, | |
ScreenStack, | |
ScreenStackHeaderConfig, | |
ScreenStackHeaderCenterView, | |
ScreenStackHeaderRightView, | |
} from 'react-native-screens'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useRef, useCallback, useState } from 'react'; | |
import { | |
Text, | |
View, | |
YellowBox, | |
NativeModules, | |
Platform, | |
Button, | |
Animated, | |
} from 'react-native'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { withSpring } from 'react-native-reanimated'; | |
const style = useAnimatedStyle(() => { | |
return { | |
width: withSpring(randomWidth.value), | |
}; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const style = useAnimatedStyle(() => { | |
if (enabled) { | |
return { | |
opacity: 1, | |
...otherStyles, | |
}; | |
} else { | |
return { | |
opacity: 0, | |
...someDisabledStyles, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return ( | |
<View style={styles.container}> | |
<Animated.View style={[styles.box, style]} /> | |
<Button | |
title="Random width" | |
onPress={() => { | |
randomWidth.value = Math.random() * 150 + 50; | |
}} | |
/> | |
</View> |