Skip to content

Instantly share code, notes, and snippets.

@ozio
Last active February 2, 2024 07:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozio/809a3519551ab56b46e0dc52dd267e47 to your computer and use it in GitHub Desktop.
Save ozio/809a3519551ab56b46e0dc52dd267e47 to your computer and use it in GitHub Desktop.
IntelliJ Idea useState live template
<template name="rus" value="const [$CONSTANT$, set$CAPITALIZED_CONSTANT$] = useState(default$CAPITALIZED_CONSTANT$$END$);" description="Create useState" toReformat="false" toShortenFQNames="true">
<variable name="CONSTANT" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="CAPITALIZED_CONSTANT" expression="capitalize(CONSTANT)" defaultValue="" alwaysStopAt="false" />
<context>
<option name="JAVA_SCRIPT" value="true" />
<option name="TypeScript" value="true" />
</context>
</template>
@ozio
Copy link
Author

ozio commented Oct 25, 2020

Copy this template to clipboard, then go to Preferences → Editor → Live Templates.

Kapture 2020-10-25 at 06 34 29

@wndlsrnr1
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment