I hereby claim:
- I am brunolemos on github.
- I am brunolemos (https://keybase.io/brunolemos) on keybase.
- I have a public key whose fingerprint is CCB7 2FCA 5650 3F50 EEB4 F796 0A8E 45A6 ACE6 6963
To claim this, I am signing this object:
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 3]; |
import React from 'react'; | |
import { ListView } from 'react-native'; | |
export default class extends React.PureComponent { | |
constructor(props) { | |
super(props); | |
const { data, dataSource, rowHasChanged: _rowHasChanged } = props; | |
this.state.data = data || []; |
// usage: | |
// export default debounce(100)(MyComponent); | |
import React from 'react'; | |
import debounce from 'lodash/debounce'; | |
export default (interval, ...debounceArgs) => { | |
if (typeof interval !== 'number' && interval > 0) { | |
throw new Error('[debounce] Interval (ms) parameter not received.'); | |
} |
I hereby claim:
To claim this, I am signing this object:
# Xcode > Build Phases > Bundle React Native code and images | |
export NODE_BINARY=node | |
./react-native-xcode.sh |
@withTest('myNewPropName') | |
export default class App extends PureComponent... |
// Live demo: https://snack.expo.io/@brunolemos/tabview | |
import React, { Component } from 'react'; | |
import { Platform, StyleSheet, View } from 'react-native'; | |
import { Constants } from 'expo'; | |
import TabView from './components/TabView'; | |
const routes = [{ index: 0, title: 'Tab 0' }, { index: 1, title: 'Tab 1' }]; |
// Source: https://github.com/react-community/react-native-platform-touchable | |
import React, { PureComponent, ReactNode } from 'react' | |
import { | |
BackgroundPropType, | |
Platform, | |
StyleProp, | |
TouchableNativeFeedback, | |
TouchableNativeFeedbackProperties, | |
TouchableNativeFeedbackStatic, | |
TouchableOpacity, |
// Demo: https://snack.expo.io/@brunolemos/touch-button-scale-effect | |
import React from 'react' | |
import { Animated, StyleProp, TouchableWithoutFeedback, TouchableWithoutFeedbackProps, ViewStyle } from 'react-native' | |
import { styleMerge } from 'shared/src/utils' | |
export interface TouchableScaleProps extends TouchableWithoutFeedbackProps { | |
containerStyle?: StyleProp<ViewStyle> | |
} |
import React from 'react' | |
import { Button, Text, View } from 'react-native' | |
import { useDispatch } from 'react-redux' | |
import { useReduxState } from '../hooks/use-redux-state' | |
import * as actions from '../redux/actions' | |
import * as selectors from '../redux/selectors' | |
export function LoginScreen() { | |
const dispatch = useDispatch() |