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
{ | |
// Place your snippets for typescriptreact here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
"TypeScript React Function Component": { | |
"prefix": "rsct", | |
"body": [ | |
"export interface ${TM_FILENAME_BASE}Props$1 {}", |
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
{ | |
"editor.suggestSelection": "first", | |
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", | |
"workbench.colorTheme": "Night Owl", | |
"workbench.iconTheme": "material-icon-theme", | |
"editor.fontFamily": "Dank Mono", | |
"editor.fontWeight": "300", | |
"editor.fontSize": 15.8, | |
"editor.lineHeight": 1.8, | |
"editor.fontLigatures": 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
const uniqBy = (array, key) => { | |
const mapKey = array.reduce((prev, cur) => { | |
const keyValue = key ? cur[key] : cur | |
return { | |
...prev, | |
[keyValue]: cur | |
} | |
}, {}) | |
return Object.values(mapKey) |
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 refresh = axios.create() | |
let isRefreshing = false | |
let requestQueue = [] | |
const processQueue = (error, token = null) => { | |
requestQueue.forEach(promise => { | |
if (error) { | |
promise.reject(error) | |
} else { | |
promise.resolve(token) |
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 React, { PureComponent } from 'react' | |
import { View, StyleSheet, TouchableOpacity, Text } from 'react-native' | |
import { Calendar } from 'react-native-calendars' | |
import dateFnsFormat from 'date-fns/format' | |
import compareAsc from 'date-fns/compare_asc' | |
const theme = { | |
textSectionTitleColor: '#0D2421', | |
dayTextColor: '#0D2421', | |
arrowColor: '#065747', |
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 React, { Component } from 'react' | |
class CompA extends Component { | |
state = { | |
text: 'This is Component A' | |
} | |
componentDidMount() { | |
console.log('ahihi comp a did mount') | |
} |
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
.tab2-header-item { | |
display: inline-block; | |
margin-right: 5px; | |
} | |
.tab2-header-item.selected { | |
background: yellow; | |
} |