Conversation
savannah-hayes
left a comment
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
This seems to be destructing data.x y and z and it doesn't seem to be used.
| fontFamily: "GillSans-SemiBold", | ||
| fontSize: 18, | ||
| marginBottom: 10, | ||
| paddingLeft: 10, | ||
| paddingTop: 5, | ||
| }, | ||
| deliveryText: { | ||
| paddingLeft: 10, | ||
| fontFamily: "Optima-Italic", |
| <Text style={styles.jokeText}>{joke.setup}</Text> | ||
| <Text style={styles.deliveryText}>{joke.delivery}</Text> |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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 /> |
There was a problem hiding this comment.
It was nice that you created a component to take care of this logic and code.
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.