This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { | |
isFetchingEnd, | |
isFetchingTop, | |
onRefresh, | |
onEndReached, | |
} = useRelayPagination(relay, users); | |
const isRefreshing = isFetchingEnd || isFetchingTop; | |
<FlatList |
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parser": "babel-eslint", | |
"plugins": [ | |
"react", | |
"react-native" | |
], | |
"parserOptions": { | |
"ecmaFeatures": { | |
"jsx": true, | |
"modules": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |