Skip to content

Instantly share code, notes, and snippets.

View tanner-west's full-sized avatar

Tanner West tanner-west

View GitHub Profile
type Question
@model
@auth(
rules: [
{allow: public, operations: [read], provider: apiKey}
{allow: private, operations: [create], provider: userPools}
]
) {
id: ID!
text: String!
import React, {useEffect, useState} from 'react';
import awsConfig from './aws-exports';
import * as eva from '@eva-design/eva';
import {
SafeAreaView,
View,
} from 'react-native';
import {Amplify, Auth} from 'aws-amplify';
import {Authenticator} from 'aws-amplify-react-native';
import {ApplicationProvider, Text, Button} from '@ui-kitten/components';
import React, {useState} from 'react';
import {SafeAreaView, View, Modal} from 'react-native';
import {Auth} from 'aws-amplify';
import {Input, Button, Card, Text} from '@ui-kitten/components';
const SignInModal = ({
onHide,
onShowSignUp,
visible,
override,
import React, {useState} from 'react';
import {Auth} from 'aws-amplify';
import {SafeAreaView, View, Modal} from 'react-native';
import {Input, Button, Card, Text} from '@ui-kitten/components';
const ConfirmSignupModal = ({
onHide,
onShowSignIn,
visible,
override,
import React, {useState} from 'react';
import {Auth} from 'aws-amplify';
import {SafeAreaView, View, Modal} from 'react-native';
import {Input, Button, Text, Card} from '@ui-kitten/components';
const SignUpModal = ({
onHide,
onShowSignIn,
onShowConfirmSignup,
visible,

justifyContent in React Native Flexbox: A visual cheat sheet

justifyContent value Preview
flex-start

The default value for justifyContent is flex-start. This justifies content to the start of its container's main axis: the top edge for column layouts and the left edge for row layouts.
"React Native Flexbox justifyContent: 'flex-start'" "React Native Flexbox justifyContent: 'flex-start'"
flex-end flex-end justifies content to the end of its flex container's main axis: the bottom edge for column layouts and the right edge for row layouts. "React Native Flexbox justifyContent: 'flex-end'" !["React Native Flexbox justifyContent: 'flex-end'"](https://s3.amazonaws.c
import React, { useState } from "react";
import {
View,
SafeAreaView,
Image,
TouchableOpacity,
LayoutChangeEvent,
} from "react-native";
import Animated, {
useSharedValue,
import React from "react";
import { View, SafeAreaView, Text, Dimensions } from "react-native";
import Animated, {
useSharedValue,
useAnimatedStyle,
useAnimatedScrollHandler,
interpolate,
interpolateColor,
Extrapolate,
} from "react-native-reanimated";
import React from "react";
import { View, SafeAreaView, Text, Dimensions, ScrollView } from "react-native";
import Ionicons from "@expo/vector-icons/Ionicons";
const { width, height } = Dimensions.get("screen");
const textColor = "#2A3B38";
const slideWidth = width * 0.75;
const slideHeight = height * 0.5;
const scrollOffset = useSharedValue(0);
const scrollHandler = useAnimatedScrollHandler({
onScroll: (event) => {
scrollOffset.value = event.contentOffset.x;
},
});