MCPcopy Create free account
hub / github.com/andrew-levy/jetpack-compose-react-native / ProgressExample

Function ProgressExample

example/app/progress.tsx:5–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { useState } from "react";
4
5export default function ProgressExample() {
6 const [progress, setProgress] = useState(0.5);
7
8 return (
9 <View style={styles.container}>
10 <Text style={styles.header}>Progress Indicator Example</Text>
11 <Button
12 text="Increment Progress"
13 onClick={() => {
14 if (progress > 1) {
15 setProgress(0);
16 return;
17 }
18 setProgress(progress + 0.1);
19 }}
20 />
21 <View style={{ gap: 10, marginVertical: 10 }}>
22 <ProgressIndicator progress={progress} />
23 <ProgressIndicator progress={progress} variant="linear" />
24 </View>
25 </View>
26 );
27}
28
29const styles = StyleSheet.create({
30 container: {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected