Skip to content

Commit 5253e9f

Browse files
committed
Merge branch 'source' of github.com:pablo-maff/fullstack-hy2020.github.io into updade-part5b
2 parents 890b5cd + 5b60d44 commit 5253e9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/10/en/part10b.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ When we start to expand our application we will need a way to transition between
517517

518518
Routing in a React Native application is a bit different to routing in a web application. The main difference is that we can't reference pages with URLs, which we type in to the browser's address bar, and can't navigate back and forth through user's history using the browsers [history API](https://developer.mozilla.org/en-US/docs/Web/API/History_API). However, this is just the matter of the router interface we are using.
519519

520-
With React Native we can use the entire React router's core, including the hooks and components. The only difference to the browser environment is that we must replace the <em>BrowserRouter</em> with React Native compatible [NativeRouter](https://reactrouter.com/docs/en/v6/api#nativerouter), provided by the [react-router-native](https://www.npmjs.com/package/react-router-native) library. Let's get started by installing the <i>react-router-native</i> library:
520+
With React Native we can use the entire React router's core, including the hooks and components. The only difference to the browser environment is that we must replace the <em>BrowserRouter</em> with React Native compatible [NativeRouter](https://reactrouter.com/en/6.4.5/router-components/native-router), provided by the [react-router-native](https://www.npmjs.com/package/react-router-native) library. Let's get started by installing the <i>react-router-native</i> library:
521521

522522
```shell
523523
npm install react-router-native
@@ -604,7 +604,7 @@ const SignIn = () => {
604604
export default SignIn;
605605
```
606606

607-
Set up a route for this <em>SignIn</em> component in the <em>Main</em> component. Also add a tab with text "Sign in" in to the app bar next to the "Repositories" tab. Users should be able to navigate between the two views by pressing the tabs (hint: you can use the React router's [Link](https://reactrouter.com/docs/en/v6/api#link-react-native) component).
607+
Set up a route for this <em>SignIn</em> component in the <em>Main</em> component. Also add a tab with text "Sign in" in to the app bar next to the "Repositories" tab. Users should be able to navigate between the two views by pressing the tabs (hint: you can use the React router's [Link](https://reactrouter.com/en/6.4.5/components/link-native) component).
608608

609609
#### Exercise 10.7: scrollable app bar
610610

0 commit comments

Comments
 (0)