MCPcopy Index your code
hub / github.com/codemotionapps/react-native-dynamic / App

Function App

example/App.tsx:18–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16}
17
18export default function App() {
19 const mode = useDarkModeContext()
20 const styles = useDynamicValue(dynamicStyles)
21 const logo = useDynamicValue(require('./logoLight.png'), require('./logoDark.png'))
22
23 return (
24 <View style={styles.container}>
25 <Image source={require('./meme.png')} style={styles.meme} />
26
27 <Image source={logo} style={styles.image} />
28
29 <Text style={styles.initialStyle}>Current mode: {mode}</Text>
30
31 <DarkModeProvider mode="dark">
32 <Extra />
33 </DarkModeProvider>
34 <DarkModeProvider mode="light">
35 <Extra />
36 </DarkModeProvider>
37
38 {/* <Counter /> */}
39 </View>
40 )
41}
42
43const dynamicStyles = new DynamicStyleSheet({
44 container: {

Callers

nothing calls this directly

Calls 1

useDynamicValueFunction · 0.85

Tested by

no test coverage detected