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
{ | |
"name": "editor_setting", | |
"version": "1.0.0", | |
"description": "vscode setting", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "MIT", |
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
{ | |
"parser": "babel-eslint", | |
"extends": ["react-app","airbnb","prettier/react","prettier"], | |
"rules": { | |
"jsx-a11y/href-no-hash": [0], | |
"generator-star-spacing": [0], | |
"consistent-return": [0], | |
"react/react-in-jsx-scope": [0], | |
"react/forbid-prop-types": [0], | |
"react/jsx-filename-extension": [1, { "extensions": [".js"] }], |
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
{ | |
"editor.formatOnSave": false, | |
"editor.detectIndentation": false, | |
"workbench.iconTheme": "material-icon-theme", | |
"gitlens.advanced.messages": { | |
"suppressCommitHasNoPreviousCommitWarning": false, | |
"suppressCommitNotFoundWarning": false, | |
"suppressFileNotUnderSourceControlWarning": false, | |
"suppressGitVersionWarning": false, | |
"suppressLineUncommittedWarning": false, |
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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
proxy_redirect off; | |
proxy_pass "http://127.0.0.1:3000"; | |
} |
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 { | |
useEffect, | |
useLayoutEffect, | |
useRef, | |
useContext, | |
useCallback, | |
useReducer | |
} from 'react' | |
import deepEqual from 'fast-deep-equal' |
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
it('should update data when polling interval has changed', async () => { | |
let a = 0 | |
function App() { | |
const [int, setInt] = React.useState(200) | |
const { data } = useSWR('/api', () => a++, { | |
refreshInterval: int, | |
dedupingInterval: 100 | |
}) | |
return <div onClick={() => setInt(int + 100)}>count: {data}</div> | |
} |