Skip to content

Instantly share code, notes, and snippets.

@spencerfeng
Last active August 8, 2020 05:32
Show Gist options
  • Save spencerfeng/f0179a4df9997975fe40502def8ab7bb to your computer and use it in GitHub Desktop.
Save spencerfeng/f0179a4df9997975fe40502def8ab7bb to your computer and use it in GitHub Desktop.
This gist is used in this medium article: When React Native Reanimated nodes get evaluated
const UseCodeComponentMountExample = () => {
const value = useRef<Value<number>>(new Value(0))
useCode(() => [debug('console log in useCode', value.current)], [])
return (
<View>Example</View>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment