Skip to content

Instantly share code, notes, and snippets.

@selbekk
Created August 21, 2017 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selbekk/12f39ee3093d8c3313d2bce456021050 to your computer and use it in GitHub Desktop.
Save selbekk/12f39ee3093d8c3313d2bce456021050 to your computer and use it in GitHub Desktop.
Sublime snippet for action and matching action creator
<snippet>
<content><![CDATA[
export const ${1:ACTION_NAME} = '${1}';
export const ${1/(?<=[^\W_])_+([^\W_])|([^\W_]+)|_+/\U$1\L$2/g} = ${2:opts} => ({
type: ${1},${3:}
});
]]></content>
<tabTrigger>action</tabTrigger>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment