Skip to content

Instantly share code, notes, and snippets.

View khadorkin's full-sized avatar

Dima Khadorkin khadorkin

  • Mobile Roadie
  • Vilnius, Lithuania
  • 00:41 (UTC +03:00)
View GitHub Profile
@khadorkin
khadorkin / index.md
Created September 28, 2019 13:19 — forked from bvaughn/index.md
How to use profiling in production mode for react-dom
import {
Dimensions,
LayoutChangeEvent,
Platform,
ScrollEvent,
ScrollView,
StyleSheet,
View,
} from "react-native";
import {Font, Space} from "../atoms";
@khadorkin
khadorkin / TouchableScale.tsx
Created September 28, 2019 13:08 — forked from brunolemos/TouchableScale.tsx
Touchable component with Scale effect, common on iOS 12 (works on mobile and web)
// 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>
}
@khadorkin
khadorkin / metro.config.js
Created September 3, 2019 06:22 — forked from mbret/metro.config.js
Symlink for React Native 0.59 (symlink + scoped package + hast name collision)
/* eslint no-useless-escape: 0 */
/* eslint max-len: 0 */
/**
* For more info regarding metro config:
* @see https://facebook.github.io/metro/docs/en/configuration
*/
const path = require("path");
const fs = require("fs");
// Get blacklist factory
@khadorkin
khadorkin / Fastfile.rb
Created July 20, 2019 20:30 — forked from cball/Fastfile.rb
Fastlane file for updating ids, display names, and icons w/ badges in React Native
# this should be the folder name under `ios` for your project
project_name = 'MyProject'
# NOTE: This is meant to be run on CI where it changes everything before building the app.
# Usage:
# `RN_RELEASE_TYPE=beta fastlane prep_release_type` (on CI these ENV variables should be set via the UI)
# Available release types: alpha, beta, production (default)
#
# If you're trying this script out locally, make sure you have ImageMagick installed, and discard the changes via git when you're done.
desc "Updates the app identifier, display name and icon for alpha, beta, and production releases"
@khadorkin
khadorkin / GitCommitEmoji.md
Created September 11, 2018 13:20 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@khadorkin
khadorkin / rn-cli.config.js
Created June 15, 2018 22:47 — forked from ndbroadbent/rn-cli.config.js
React Native CLI config
const path = require('path')
const sharedBlacklist = []
const platformBlacklists = {
ios: [
'.web.js',
'.macos.js',
/node_modules\/react-native-web\/.*/,
/node_modules\/react-native-windows\/.*/,
@khadorkin
khadorkin / App.js
Created May 27, 2018 20:23 — forked from sconstantinides/App.js
Sample Firebase task app
import React, { Component } from 'react';
import firebase from '@firebase/app';
import firestore from './firestore'; // Code: https://gist.github.com/sconstantinides/546a48ba183b1234f750ca6261440199
class App extends Component {
constructor(props) {
super(props);
this.state = {
userId: localStorage.getItem('userId') || '',
import React, { Component, createContext } from 'react'
function initStore(store) {
const Context = createContext();
class Provider extends React.Component {
constructor() {
super();
this.state = store.initialState;
}
<script>
// fbAsyncInit
// http://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/
window.fbAsyncInit = function() {
// init the FB JS SDK
FB.init({
appId: '<?php echo(FB_APP_ID); ?>',
status: true,
cookie: true,
xfbml: true,