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

Function SlidersExample

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

Source from the content-addressed store, hash-verified

3import { useState } from "react";
4
5export default function SlidersExample() {
6 const [sliderValue, setSliderValue] = useState(0.5);
7
8 return (
9 <View style={styles.container}>
10 <Text style={styles.header}>Slider Example</Text>
11 <Slider
12 value={sliderValue}
13 onValueChange={(v) => {
14 console.log("onValueChange", v);
15 setSliderValue(v);
16 }}
17 />
18 <Text>Slider value: {sliderValue}</Text>
19 </View>
20 );
21}
22
23const styles = StyleSheet.create({
24 container: {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected