MCPcopy Create free account
hub / github.com/dabbott/react-native-express / App

Function App

examples/files/hooks/useEffect.js:4–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import { Button } from 'react-native'
3
4export default function App() {
5 const [count, setCount] = useState(0)
6 const countEvery3 = Math.floor(count / 3)
7
8 useEffect(() => {
9 console.log(countEvery3)
10 }, [countEvery3])
11
12 return (
13 <Button
14 title={`Increment ${count}`}
15 onPress={() => {
16 setCount(count + 1)
17 }}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected