Skip to content

Conversation

@EmmaSprings
Copy link

@EmmaSprings EmmaSprings commented May 1, 2022

My reflections on how this week's project turned out:
I found react Native fun and interesting and would like to learn more about it and also be able to deploy it. I had fun making it and finally got an API to work. I chose to go for the accelerator so every time you shake the phone you get a new joke. You can also press the button to render a new one.

Things I'd like to have clarified or explained in more detail:

How to actually deploy this.
Since that hasn't been working, I will add a screenshot from the simulator.
However, here is the link I got after "expo publish" which unfortunately seems to be broken.
Screenshot 2022-05-01 at 21 55 04

Copy link

@savannah-hayes savannah-hayes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job on your app, it was really nice concept. I enjoyed reading all of the random jokes. There seems to be a small bug in your code, where it doesn't display a joke sometimes.

I liked how you were able to include custom fonts and create a shake sensor to allow the user to shake for a new random joke. Nice work!

});


const { x, y, z } = data;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be destructing data.x y and z and it doesn't seem to be used.

Comment on lines +99 to +107
fontFamily: "GillSans-SemiBold",
fontSize: 18,
marginBottom: 10,
paddingLeft: 10,
paddingTop: 5,
},
deliveryText: {
paddingLeft: 10,
fontFamily: "Optima-Italic",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job adding custom fonts!

Comment on lines +68 to +69
<Text style={styles.jokeText}>{joke.setup}</Text>
<Text style={styles.deliveryText}>{joke.delivery}</Text>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested your app on my phone and in the browser and I noticed a small bug. Sometimes there are joke.setup and joke.delivery that don't get displayed.

I tested the api you were calling in postman and there seem to be times when the api doesn't return a joke or delivery. This might be breaking your code because sometime when I shake for a new joke it comes back empty.

Maybe there is a way you could handle this to show the joke or delivery even if one or the other doesn't come back from the response.

button: {
borderWidth: 2,
padding: 8,
marginTop: 80,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This marginTop of 80px seems to push the button outside of the container sometimes when the text content is a bit longer.

<View style={styles.container}>

<Text style={styles.header}>/ Shake for fun /</Text>
<ArtFetch />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was nice that you created a component to take care of this logic and code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants