Skip to content

Instantly share code, notes, and snippets.

View nastyakitsune's full-sized avatar
🦊
let's make something cool

Nastya nastyakitsune

🦊
let's make something cool
View GitHub Profile
@nastyakitsune
nastyakitsune / AppDelegate.h
Created March 31, 2020 14:58
App Linking React Native & Objective-C
#import <UIKit/UIKit.h>
#import <RNAppAuthAuthorizationFlowManager.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate, RNAppAuthAuthorizationFlowManager>
@property (nonatomic, strong) UIWindow *window;
@property(nonatomic, weak)id<RNAppAuthAuthorizationFlowManagerDelegate>authorizationFlowManagerDelegate;
@end
@nastyakitsune
nastyakitsune / AppDelegate.m
Created March 31, 2020 14:57
App Linking React Native & Objective-C
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <ReactNativeNavigation/ReactNativeNavigation.h>
#import <React/RCTLinkingManager.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
@nastyakitsune
nastyakitsune / Component.js
Created December 3, 2019 14:48
React Native Settings Component Layout
import React from 'react';
import {View, Text, TouchableOpacity, StyleSheet} from 'react-native';
import {SimpleLink, SectionTitle} from 'components';
import styles from './styles';
const SettingsView = ({
type = 'creator',
email = '',
minRate = 0,
logout,
@nastyakitsune
nastyakitsune / React Native Reset Cache
Last active September 24, 2019 13:30
React Native Reset Cache
// resets all cache, removes node_modules and start new server instance
watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache verify && npm i && npm start -- --reset-cache
@nastyakitsune
nastyakitsune / CountdownTimer.js
Created July 26, 2019 17:18
Simple countdown timer with React Hooks
import React, { useState, useEffect } from "react";
import "./index.css";
// const date = { dateNum: 199, dateType: 'min', dateInterval: 60000 } - prop for CountdownTimer
const CountdownTimer = ({ dateNum, dateType, dateInterval }) => {
const [num, setNum] = useState(dateNum);
useEffect(() => {
const interval = setInterval(() => {
@nastyakitsune
nastyakitsune / Errors.js
Last active July 21, 2019 20:25
GraphQL Errors
Errors {
type: String!,
operation: String!,
message: String!,
}
@nastyakitsune
nastyakitsune / Inputs.js
Last active July 21, 2019 20:25
Parameters for GraphQL mutations
// standard registration input
input StandardRegistrationInput {
email: String!
password: String!
passwordConfirmed: String!
userName: String!
avatarUrl: String
}
// social registration input