Skip to content

Instantly share code, notes, and snippets.

View rsp8055's full-sized avatar

Rohit Patil rsp8055

View GitHub Profile
@danialkalbasi
danialkalbasi / PowerTranslatorDemo.js
Last active October 27, 2020 07:01
Power Translator Demo
import React, { Component } from 'react';
import { PowerTranslator, ProviderTypes, TranslatorConfiguration } from 'react-native-power-translator';
import { View, ScrollView, TouchableOpacity, Text } from 'react-native';
export default class PowerTranslatorDemo extends Component {
constructor() {
super();
this.state = { languageCode: 'fr' };
}
@yanqiw
yanqiw / react-native-router-flux-android-back-button.js
Created July 15, 2016 09:31
react-native-router-flux, handle android back button event.
import { BackAndroid } from 'react-native';
import {Reducer} from 'react-native-router-flux';
backButtonPressedOnceToExit = false;
let currentSceneName = null;
const reducerCreate = params=>{
const defaultReducer = Reducer(params);
return (state, action)=>{
console.info("reducerCreate.{state,action}", state, action);
@EdCharbeneau
EdCharbeneau / string.isNullOrWhiteSpace.js
Created March 14, 2014 17:11
Javascript test a string to see if it is Null or Whitespace. Equivelent to C# String.IsNullOrWhiteSpace
function isNullOrWhiteSpace(str) {
return (!str || str.length === 0 || /^\s*$/.test(str))
}