const Component = () = {
// a
// lot
// of
// logic
This file contains hidden or 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 fetchMachine = Machine({ | |
id: 'fetch', | |
initial: 'idle', | |
context: { | |
}, | |
states: { | |
idle: { | |
on: { | |
CHANGE_THEME: 'required_information_filled_in', | |
CHANGE_TIME_TABLE: 'required_information_filled_in', |
This file contains hidden or 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
{ | |
"singleQuote": true, | |
"trailingComma": "all" | |
} |
This file contains hidden or 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
// not wrapped | |
const foo = 'foo'; | |
// already wrapped | |
const bar = ['bar']; | |
console.log([foo].flat()) | |
// [ 'foo' ] |
This file contains hidden or 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
#!/bin/bash | |
# https://api.slack.com/legacy/custom-integrations/legacy-tokens | |
slack_legacy_token=<insert-your-token-here> | |
function set_slack_status { | |
curl -s -S -X POST \ | |
-d "token=$1" \ | |
--data-urlencode "profile={\"status_text\": \"Focus time!\", \"status_emoji\": \"🍅\"}" \ | |
https://slack.com/api/users.profile.set |
This file contains hidden or 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
#!/usr/bin/env node | |
for(i=0;i<100;)console.log((++i%3?'':'Fizz')+(i%5?'':'Buzz')||i) |
This file contains hidden or 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 { css } from 'styled-components'; | |
export default { | |
tablet: (...args) => css` | |
@media (max-width: 1279px) { | |
${css(...args)}; | |
} | |
`, | |
phone: (...args) => css` |
React Fiber is an ongoing reimplementation of React's core algorithm. It is the culmination of over two years of research by the React team.
This file contains hidden or 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
document.addEventListener(`touchmove`, e => { | |
e.preventDefault(); | |
}); |
You can force syntax highlighting on files in Atom by using customFileTypes in config.cson
"*":
core:
customFileTypes:
"source.json": [
".eslintrc"
".babelrc"
]
NewerOlder