-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
# React Hooks Snippets for Visual Studio Code | ||
|
||
> The React Hooks API is currently *experimental*. See https://reactjs.org/hooks for more information. | ||
> The React Hooks API is currently _experimental_. See https://reactjs.org/hooks for more information. | ||
## Features | ||
|
||
![useState](https://github.com/antmdvs/vscode-react-hooks-snippets/blob/master/images/useState.gif) | ||
This extension contributes a handy snippet for the [useState hook](https://reactjs.org/docs/hooks-reference.html#usestate). | ||
|
||
The second placeholder value is automatically capitalized on <kbd>Tab</kbd>. | ||
![useState](images/useState.gif) | ||
|
||
|Snippet|Purpose| | ||
|:---:|:---:| | ||
|<code>us</code>|<code>useState</code>| | ||
The second placeholder value is automatically capitalized on <kbd>Tab</kbd>. | ||
|
||
## Requirements | ||
|
||
You must be using Visual Studio Code 1.25.1 or higher to ensure all snippets work properly. | ||
Visual Studio Code 1.25.1 or higher. | ||
|
||
## What about the other hooks? | ||
|
||
TBD. (Hooks are still just a proprosal after all.) | ||
|
||
## Only one snippet? Where are the rest? | ||
## I prefer `let` over `const`. | ||
|
||
Coming soon. | ||
It's easy enough to [create your own snippet](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_creating-your-own-snippets). You can use [this gist](https://gist.github.com/antmdvs/63903d7f98f8d82d0c6463abebb77cd7) as a starting point. | ||
|
||
----------------------------------------------------------------------------------------------------------- | ||
--- |