Skip to content

Instantly share code, notes, and snippets.

View cooperka's full-sized avatar

Kevin Cooper cooperka

View GitHub Profile
@cooperka
cooperka / getFlatList.bash
Last active January 12, 2021 16:36
How to download FlatList and its related dependencies directly into your node_modules.
mkdir -p node_modules/react-native/Libraries/Lists/ && \
for file in 'FlatList' 'MetroListView' 'SectionList' 'VirtualizedList' 'VirtualizedSectionList' 'ViewabilityHelper' 'VirtualizeUtils'; \
do curl https://raw.githubusercontent.com/facebook/react-native/master/Libraries/Lists/${file}.js > node_modules/react-native/Libraries/Lists/${file}.js; \
done
@cooperka
cooperka / ImmutableListView to ImmutableVirtualizedList.diff
Last active August 1, 2017 04:39
Migrating from ImmutableListView to ImmutableVirtualizedList in React Native (similar to FlatList).
import { Text, View } from 'react-native';
-import { ImmutableListView } from 'react-native-immutable-list-view';
+import { ImmutableVirtualizedList } from 'react-native-immutable-list-view';
import style from './styles';
import listData from './listData';
class App extends Component {
- renderRow(rowData) {
@cooperka
cooperka / ListView to FlatList.diff
Last active June 18, 2020 05:36
Migrating from ListView to FlatList in React Native.
-import { Text, View, ListView } from 'react-native';
+import { Text, View, FlatList } from 'react-native';
import style from './styles';
import listData from './listData';
class App extends Component {
- constructor(props) {
- super(props);
@cooperka
cooperka / ListView to ImmutableListView.diff
Last active August 1, 2017 04:40
Migrating from ListView to ImmutableListView in React Native.
-import { Text, View, ListView } from 'react-native';
+import { Text, View } from 'react-native';
+import { ImmutableListView } from 'react-native-immutable-list-view';
import style from './styles';
import listData from './listData';
class App extends Component {
- constructor(props) {
@cooperka
cooperka / output.txt
Created September 21, 2016 18:09
jest --debug
> JestBrokenPromises@0.0.1 test /Users/klap-hotel/Dev/JestBrokenPromises
> jest "--debug"
jest version = 15.1.1
test framework = jasmine2
config = {
"haste": {
"defaultPlatform": "ios",
"platforms": [
"android",