Skip to content

Ian's Code Review#46

Open
taliabahar wants to merge 4 commits intomasterfrom
style
Open

Ian's Code Review#46
taliabahar wants to merge 4 commits intomasterfrom
style

Conversation

@taliabahar
Copy link
Collaborator

No description provided.

@ianlizzo ianlizzo changed the title fixed typo Ian's Code Review Mar 24, 2021
Copy link
Collaborator

@ianlizzo ianlizzo left a comment

Choose a reason for hiding this comment

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

Great work! Check within the code for more comments (Github is very flawed in that I can't comment on non-diffed code). I've added some comments on potential improvements and refactors you could do to keep your code more clean and efficient. I would also make sure to remove any lingering or unnecessary comments before merging to main. Also, like I've mentioned to others your app would benefit from even small smoke tests using something like React Testing Library. Other than that, fantastic work!


// TODO: remove extraneous comments
const EmergencyContacts = ({ navigation }) => {
// [Ian]: I would recommend updating to React Navigation 5.x.x so you can use Hooks and
Copy link
Collaborator

Choose a reason for hiding this comment

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

To add to this, I recommend Hooks so that you don't have to pass the prop around constantly. For example, instead of passing in the navigation prop, you would use

Suggested change
// [Ian]: I would recommend updating to React Navigation 5.x.x so you can use Hooks and
const navigation = useNavigation();
...
navigation.navigate(someRoute)

and then for your getParam you could use the route hook:

Suggested change
// [Ian]: I would recommend updating to React Navigation 5.x.x so you can use Hooks and
const route = useRoute();
const { object, otherObject } = route.params;


import { AppLoading } from "expo";
import { CoveredByYourGrace_400Regular } from "@expo-google-fonts/covered-by-your-grace";
import { TextInput } from "react-native-gesture-handler";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Make sure this is the TextInput you want, usually the base one is imported from "react-native"

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