Skip to content

Instantly share code, notes, and snippets.

View legidium's full-sized avatar

Vitaly Antonov legidium

View GitHub Profile
@legidium
legidium / endpoints.ts
Last active October 21, 2019 03:40
TypeScript: API endpoints factory
interface Params {
[K: string]: string
}
const url = <P extends Partial<Params>>(pathname: string) => (params?: P): string => {
const pathParams: string[] = [];
const path = pathname.replace(/({\w+})/g, m => {
const name = m.slice(1, -1);
pathParams.push(name);
@legidium
legidium / index.ios.js
Created January 8, 2019 03:15 — forked from Jpoliachik/index.ios.js
ReactNative LayoutAnimation Example
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
TouchableOpacity,
LayoutAnimation,
} from 'react-native';
@legidium
legidium / introrx.md
Created June 24, 2017 14:56 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
var Col = require('react-bootstrap/lib/Col')
var PageHeader = require('react-bootstrap/lib/PageHeader')
var React = require('react')
var Row = require('react-bootstrap/lib/Row')
var {connect} = require('react-redux')
var {reduxForm} = require('redux-form')
var DateInput = require('./DateInput')
var FormField = require('./FormField')
var LoadingButton = require('./LoadingButton')