Skip to content

feature/improve-use-state-snippet #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

yuritoledo
Copy link
Contributor

Improve the UseState snippet, to a better DX.
Was fixed some duplicated keys too.

PS: Some indentation was with tabs among the spaces, was fixed too.

Improve the UseState snippet, to a better DX.
Was fixed some duplicated keys too.
Copy link

@ice-chillios ice-chillios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you use to make arrays multiple lines? I have a prettier which after save forces one-liners with most of those you've changed

@@ -1204,7 +1412,9 @@
},
"useState": {
"prefix": "useState",
"body": ["const [${1:state}, ${2:setState}] = useState(${3:initialState})"]
"body": [
"const [${1:state}, set${1/(.*)/${1:/capitalize}/}] = useState($2:initialState)"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ice-chillios ice-chillios merged commit 47c8a29 into r5n-labs:master Mar 9, 2019
@yuritoledo yuritoledo deleted the feature/improve-use-state-snippet branch March 10, 2019 11:34
@yuritoledo yuritoledo restored the feature/improve-use-state-snippet branch March 10, 2019 11:34
@yuritoledo
Copy link
Contributor Author

yuritoledo commented Mar 10, 2019

I just use the VSCode inner formatter :)
Enable on settings, "FormatOnSave"

@yuritoledo yuritoledo deleted the feature/improve-use-state-snippet branch March 10, 2019 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants