Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>react-use-state-snippetNew to Visual Studio Code? Get it now.
react-use-state-snippet

react-use-state-snippet

ljy

|
541 installs
| (0) | Free
can make functional snippet
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

React-Use-State

When we use react with useHooks and use state, Many snippets supplying just normal snippet.

So mostly snippets make like this.

"const [ $1, set$1 ] = React.useState<>();"

but this is not good to camelCase.

So I made it like

react-use-state-example

Make setter to CamelCase!!


This will be help for make setter on React.useState;

When we use useState with camelCase, we need to modify setter's name toUpperCase,

But this is can not ordered with default snippet, so I made it

If you select or have clipboard, ( like hello )

this will make to "setHello"

Done.

Will make Function

Auto Import useState

  • Current supplying "React.useState", but will be read on settings.json by autoImport boolean

Supply useEffect, useCallback, useMemo ~~

  • If supply other useHooks too, extension name will be change
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft