Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/a145789/vscode-quick-usestate
quick generate React useState code
https://github.com/a145789/vscode-quick-usestate
extension visual-studio-code vscode vscode-extension
Last synced: 29 days ago
JSON representation
quick generate React useState code
- Host: GitHub
- URL: https://github.com/a145789/vscode-quick-usestate
- Owner: a145789
- License: mit
- Created: 2022-10-25T06:36:42.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-24T02:49:53.000Z (about 2 years ago)
- Last Synced: 2024-10-13T19:12:02.269Z (2 months ago)
- Topics: extension, visual-studio-code, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=clencat.react-quick-useState
- Size: 240 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
React Quick useState
Quick generate React useState code# Usage
Enter `const ` to open the prompt, use __/__ to split code.
```ts
// input
const count/0
// output
const [count, setCount] = useState(0)// input
const name/string/'John'
// output
const [name, setName] = useState('John')// input
const arr/number[]/[]
// output
const [arr, setArr] = useState([])// input
const fooBar/Foo | Bar/'foo'
// output
const [fooBar, setFooBar] = useState('foo')
```> 如果没显示提示,请键入 `/` 字符开启提示
> If no prompt is displayed, type the character `/` to enable the prompt