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
Show hidden 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> | |
| } |
Vite+ (vp) is the unified toolchain and entry point for web development. It manages the runtime, package manager, and frontend toolchain in one place. For Node.js and web development, prefer vp commands.
Daily command mapping:
- Shims node, npm, npx, vpx, vpr
- Dependencies: use
vp install,vp add,vp remove,vp update,vp dedupe,vp outdated,vp list,vp why,vp info, andvp rebuild. Pass install flags throughvp install, such as--frozen-lockfile,--lockfile-only,--filter <pattern>, or-w. - Vite+ project lifecycle: use
vp dev,vp build,vp preview,vp check,vp lint,vp fmt, andvp test. Prefervp checkfor static validation loops. Usevp packfor libraries, packages, and CLIs.
