Skip to content

Instantly share code, notes, and snippets.

@PrasathRavichandran
Created June 8, 2022 03:06
Show Gist options
  • Save PrasathRavichandran/86370fa962b52a4dde1afbd24ceafa73 to your computer and use it in GitHub Desktop.
Save PrasathRavichandran/86370fa962b52a4dde1afbd24ceafa73 to your computer and use it in GitHub Desktop.
import React from 'react';
import {Button} from 'react-native';
import { useSharedValue } from 'react-native-reanimated';
function App() {
const sharedValue = useSharedValue(0);
return (
<Button
onPress={() => sharedValue.value += 1}
title="Press to count..."
/>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment