Skip to content

Instantly share code, notes, and snippets.

import React , {Component} from 'react';
import { View, Text, ScrollView, Dimensions, TouchableOpacity } from 'react-native';
const isCloseToBottom = ({layoutMeasurement, contentOffset, contentSize}) => {
const paddingToBottom = 20;
return layoutMeasurement.height + contentOffset.y >=
contentSize.height - paddingToBottom;
};
class TermsAndConditions extends Component{
@luisbajana
luisbajana / App.js
Created July 6, 2019 15:07
Basic Animation using React Native
import React, {Component} from 'react';
import { Platform, StyleSheet, Text, View, TouchableHighlight, Dimensions, Animated, PanResponder } from 'react-native';
type Props = {};
export default class App extends Component<Props> {
componentWillMount(){
this.position = new Animated.ValueXY(0,0)
'use strict';
const {Storage} = require('@google-cloud/storage');
const storage = new Storage();
storage
.getBuckets()
.then((results) => {
const buckets = results[0];