Skip to content

Instantly share code, notes, and snippets.

@jonesaustindev
jonesaustindev / App.jsx
Last active October 19, 2022 06:52
React Native + Apollo Client - Offline Mutations (Blog post: https://teamairship.com/offline-first-approach-for-mobile-apps-react-native-and-apollo/)
import React, { useState, useEffect } from 'react';
import { View, Text } from 'react-native';
import { ApolloProvider } from '@apollo/client';
import NetInfo from '@react-native-community/netinfo';
import QueueLink from 'apollo-link-queue';
import AsyncStorage from '@react-native-community/async-storage';
import { getApolloClient } from '../apollo/apolloClient';
import NoteView from './NoteView';
@jonesaustindev
jonesaustindev / AnimatedButton.tsx
Created September 9, 2020 20:49
Animated button that scales up on press
import React from 'react';
import { Text, StyleSheet } from 'react-native';
import Animated, {
Value,
cond,
eq,
interpolate,
Extrapolate,
} from 'react-native-reanimated';
import { State, TapGestureHandler } from 'react-native-gesture-handler';