Building an app like Uber using React-Native

Madhu Naidu
2 min readMar 6, 2019

--

Part 9: Add login and signup to our app

login screen

If you are coming here for the first time please follow my previous tutorials to know more

In the previous parts we saw booking a ride, view trip details, navigation and view user details. Now in this section we will add login and signup to our app. We will be hard coding our login details for now, on providing the correct user name and password user will be routed to Home screen.

We will be stack navigation to navigate between the login, signup and home screens. So first install “react-navigation”, “react-native-gesture-handler” and link the components. Please refer to part 8 for more details on stack navigation.

The code for login screen is:

The code for signup screen is:

The code for Home screen is:

One the above changes are done run the app using “react-native run-android” and the output will look like below screen.

login screen
signup screen
error message dialogue
home screen

The source code for login section is found here. Now that we are done with almost all the screens, we will merge all the individual modules by adding navigation, headers, footer, drawer etc. The final merged code can be found in github.

If you encounter any errors during this module please refer to the error debugging section

--

--

Madhu Naidu

An enthusiastic developer interested in taking up challenges in my daily life