Skip to content

Instantly share code, notes, and snippets.

View asgvard's full-sized avatar

Dmitriy Bryokhin asgvard

View GitHub Profile
@asgvard
asgvard / spatial-nav-distributed-logic.js
Last active April 13, 2019 19:00
Spatial Navigation article. Distributed logic example
const HomeScreen extends PureComponent {
constructor(props) {
this.state = {
focusedIndex: 0
};
this.onKeyPress = this.onKeyPress.bind(this);
}
componentDidMount() {
const HomeScreen extends PureComponent {
constructor(props) {
this.state = {
focusedKey: null
};
this.onSetFocus = this.onSetFocus.bind(this);
}
componentDidUpdate(oldProps) {
@asgvard
asgvard / ReactNativeComponentBoilerplate.js
Last active September 7, 2017 12:21
React Native Component Boilerplate
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
View,
StyleSheet
} from 'react-native';
const styles = StyleSheet.create({
});