Skip to content

Instantly share code, notes, and snippets.

@defrian
defrian / RNFirebaseMock.js
Created January 23, 2019 22:00 — forked from himanshusinghs/RNFirebaseMock.js
React Native Firebase Mock
'use strict'
export class Database {
ref = (path) => {
if (!this[path]) {
this[path] = new Reference(path)
}
return this[path]
}
}
@defrian
defrian / SlideTextInput.js
Created November 2, 2018 22:46 — forked from MikeShi42/SlideTextInput.js
Terrible TextInput extends that doesn't steal all touches.
import React, { Component } from 'react';
import {TextInput, TouchableWithoutFeedback, StyleSheet} from 'react-native';
const Platform = require('Platform');
const requireNativeComponent = require('requireNativeComponent');
const emptyFunction = require('fbjs/lib/emptyFunction');
if (Platform.OS === 'android') {
var AndroidTextInput = requireNativeComponent('AndroidTextInput', null);
} else if (Platform.OS === 'ios') {
var RCTTextView = requireNativeComponent('RCTTextView', null);