start new:
tmux
start new with session name:
tmux new -s myname
## How to hide API keys from github ## | |
1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while | |
retaining your commits: https://help.github.com/articles/remove-sensitive-data/ | |
2. In the terminal, create a config.js file and open it up: | |
touch config.js | |
atom config.js |
{ | |
"parser": "babel-eslint", | |
"plugins": [ | |
"react", | |
"react-native" | |
], | |
"parserOptions": { | |
"ecmaFeatures": { | |
"jsx": true, | |
"modules": true |
TypeScript supports Pick
to allow you to get a "subset" object type of a given type, but there is no built-in Pick
for deeper nested fields.
If you have a function that takes a large object as argument, but you don't use all of its fields, you can use Pick
, Pick2
, Pick3
, etc to narrow down the input type to be only just what you need. This will make it easier to test your function, because when mocking the input object, you don't need to pass all fields of the "large" object.
const { | |
isFetchingEnd, | |
isFetchingTop, | |
onRefresh, | |
onEndReached, | |
} = useRelayPagination(relay, users); | |
const isRefreshing = isFetchingEnd || isFetchingTop; | |
<FlatList |
// | |
// YeetJSIUTils.h | |
// yeet | |
// | |
// Created by Jarred WSumner on 1/30/20. | |
// Copyright © 2020 Facebook. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <jsi/jsi.h> |
import { useEffect, useState } from 'react'; | |
import * as Font from 'expo-font'; | |
import { SplashScreen } from 'expo'; | |
/** | |
* Load and use resources that need to be loaded async by Expo SDK | |
*/ | |
const useExpoResources = () => { | |
const [isLoading, setIsLoading] = useState(true); |