/Griders_react-native-app

Code regarding the completed Hook-built react native app

Primary LanguageJavaScript

Goals:

  • hooks && reducer controlled state -> userReducer
  • YELL_CASE for important constants
  • opacityPress button
  • MVC architecture
  • switch statements
  • autoCapitalize="none" and autoCorrect={false}
  • axios + extract api business logic
  • api axios files
  • async error handling
  • useEffect || useEffect(() => {}, [])
  • navigation via props || withNavigation() -- react-navigation
if (!result) return null;

    return (
      <View>
        <Text>{result.name}</Text>
        <FlatList
          data={result.photos}
          keyExtractor={photo => photo}
          renderItem={({ item }) => {
            <Image source={{ uri: item }} />;
          }}
        />
      </View>
    );