Assignment 3
Assignment 3
Overview
For this assignment, you will create a simple app in React Native that allows users
to sign up for the Little Lemon newsletter to ensure that they always get the latest
updates from the restaurant.
This task will entail creating two screens and setting up a visual layout with core
components such as Text, Image and View, configuring some TextInput and
Pressable components that the user can interact with, and setting up React
Navigation so that users can move between screens.
You are encouraged to apply all the skills that you acquired during this course, and
you can revisit the previous course materials as needed if you need to refresh your
knowledge or find some inspiration.
Instructions
The Little Lemon app should have a Welcome screen and a Subscribe screen.
Users will start on the Welcome screen and move to the Subscribe screen, where
they can fill out and submit a form. The steps below will guide you through the
specific requirements.
3_little-lemon-starter-code.zip
Setting up React Native CLI (click on the React Native CLI Quickstart tab)
Setting up Expo CLI (click on the Expo Go Quickstart tab)
1
A guide to Expo Snack, an in-browser React Native environment with no
local setup required
Tip: Use whichever method you have been using to run code throughout this
course.
2
Step 4: Welcome screen component
The Welcome screen should have a Little Lemon logo and some text to welcome
users. It should also contain a Pressable button that can navigate to the Subscribe
screen. The text on this button should read “Newsletter”.
Add the code to complete the Welcome Screen component. You will need
components such as View, Text, Image and Pressable to achieve the desired
output. Make sure to use the navigation prop to move between the screens.
3
export default WelcomeScreen;
The Subscribe screen must contain a text input box that allows the user to enter
their email address and a button that reads “Subscribe”. Clicking on this button will
then show an alert message to the user to confirm the subscription. The entire
workflow is illustrated in the screenshots above. Use this as an inspiration to get
your own Little Lemon app setup.
Add the code to complete the Subscribe screen component. In addition to the
components that you used in the Welcome screen, you will also use the TextInput
component to configure the text input box to enter an email address and the Alert
component to display an alert message.
4
};
Grading Criteria
At the peer review step, you will submit your completed assignment files. These will
be downloaded by at least two of your peers, who will view your code and interact
with your app in an emulator. They will review your work based on the following
criteria:
5
Is there a button on the Subscribe screen that is only enabled after text has
been entered in the text input box above?
Does clicking the Subscribe button trigger an alert containing a confirmation
message?
Is the Little Lemon logo image rendered on both the Welcome Screen and
the Subscribe Screen using the Image component?
In the code, are StyleSheets used to store styles outside of the component’s
render?