Skip to content

antmdvs/vscode-react-hooks-snippets

Repository files navigation

React Hooks Snippets for Visual Studio Code

The React Hooks API is currently experimental. See https://reactjs.org/hooks for more information.

Features

This extension contributes a handy snippet for the useState hook.

useState

The second placeholder value is automatically capitalized on Tab.

In addition, there are a few variations with common initial state values:

Snippet Purpose
us useState()
usf useState(false)
ust useState(true)
usn useState(null)

Requirements

Visual Studio Code 1.25.1 or higher.

"What about the other hooks?"

TBD. After all, Hooks are not officially released yet.

"I prefer let over const."

It's easy enough to create your own snippet in VS Code! You can use this gist as a starting point.


Releases

No releases published

Packages

No packages published