MCPcopy Create free account
hub / github.com/expo/examples / Home

Function Home

with-react-router/App.js:4–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import { Router, Route, Link } from "./react-router";
3
4const Home = () => <Text>Home</Text>;
5
6const About = () => <Text>About</Text>;
7
8const App = () => (
9 <Router>
10 <View style={styles.container}>
11 <View style={styles.nav}>
12 <Link to="/">
13 <Text>Home</Text>
14 </Link>
15 <Link to="/about">
16 <Text>About</Text>
17 </Link>
18 </View>
19
20 <Route exact path="/" component={Home} />
21 <Route path="/about" component={About} />
22 </View>
23 </Router>
24);
25
26const styles = StyleSheet.create({
27 container: {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected