Joke HW Instructions

In this lab, we will create the shell for your first react native application.  Will be running the application inside the expo run time environment. Follow the steps below to set up your expo environment.

1. Get the command-line tool

You will run this tool locally to package, serve, and publish your projects. The --global flag means that it will be used as a command line tool. (This is different from local installs which will be bundled with your app)

npm install expo-cli --global

2. Create your project's folder.

You will be asked to create an Expo account before proceeding.

expo init lab5

cd lab5

expo start

3. Preview your project

Download the expo client for your device. [IOS] & [Android]

4. Implement the APP that generates a random Prof X joke.

Write an application that generates a random Prof X Joke every 20 seconds.

a. Your application should call this API [http://www.icndb.com/api].  (10 points)

b. Your application should only display jokes for the nerdy category. (10 points)

c. And should parse the JSON object below. And display the joke. (10 points)


{ "type": "success", "value": { "id": 546, "joke": "Prof X does infinite loops in 4 seconds.", "categories": ["nerdy"] } }


Notes:

  1. You should load the first joke, then wait 20 seconds before loading the next joke.

 

Complete and Continue