Skip to content

Instantly share code, notes, and snippets.

@dereknelson
dereknelson / NotDumbImage.js
Last active July 11, 2019 21:36
Entirety of image caching
import React, { Component, PureComponent } from 'react';
import { connect } from 'react-redux';
import { View, ActivityIndicator, Image, Platform } from 'react-native';
import { FileSystem } from 'expo'
import md5 from 'js-md5';
const ios = Platform.OS == 'ios'
import { downloadImage, removeFromDownloading } from './NotDumbImageActions';
import { imgDownloadIsOld } from './cacheRedux';
@dereknelson
dereknelson / alphabetizedList.js
Created March 29, 2018 18:03
Alphabetized List implementation
import React, { Component, } from 'react';
import { View, Text, TouchableOpacity, FlatList, ListItem, Image, TextInput, Dimensions,
Animated, StyleSheet, SectionList, PanResponder, PixelRatio, ScrollView } from 'react-native';
import sectionListGetItemLayout from 'react-native-section-list-get-item-layout'
var { height, width } = Dimensions.get('window')
/* this component is re-used between displaying the friends/groups and being able to pick them in metoo posts, so there are a few different if statements that
@dereknelson
dereknelson / AppNavigator
Last active February 26, 2018 23:23
stack navigator issue
import React, { Component } from 'react';
import { AppState } from 'react-native';
import { addNavigationHelpers, NavigationActions } from 'react-navigation';
import { connect } from 'react-redux';
import { LoginScreen } from '../screens';
import Navigator from './Navigator';
import OnboardingStackNavigator from '../screens/auth/onboarding/BottomTabNavigator';
import { addListener } from '../redux/store';