Skip to content

Commit

Permalink
πŸ§‘β€πŸ’»: update some live templates
Browse files Browse the repository at this point in the history
  • Loading branch information
junerver committed Oct 8, 2024
1 parent 865a3ef commit b18770b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions LiveTemplates/hooks.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
<templateSet group="hooks">
<template name="ur" value="val ($data$, $loading$, $error$, $run$, $mutate$, $refresh$, $cancel$) = useRequest(&#10; requestFn = $request$,&#10; optionsOf {&#10; defaultParams = arrayOf($1$, $2$)&#10; })" description="useRequest" toReformat="false" toShortenFQNames="true">
<template name="ur" value="val ($data$State, $loading$State, $error$State, $req$) = useRequest(&#10; requestFn = $request$,&#10; optionsOf = {&#10; defaultParams = arrayOf($1$, $2$)&#10; })&#10;val $data$ by $data$State&#10;val $loading$ by $loading$State&#10;val $error$ by $error$State&#10;" description="useRequest" toReformat="false" toShortenFQNames="true">
<variable name="data" expression="" defaultValue="&quot;data&quot;" alwaysStopAt="true" />
<variable name="loading" expression="" defaultValue="&quot;loading&quot;" alwaysStopAt="true" />
<variable name="error" expression="" defaultValue="&quot;error&quot;" alwaysStopAt="true" />
<variable name="run" expression="" defaultValue="&quot;run&quot;" alwaysStopAt="true" />
<variable name="mutate" expression="" defaultValue="&quot;mutate&quot;" alwaysStopAt="true" />
<variable name="refresh" expression="" defaultValue="&quot;refresh&quot;" alwaysStopAt="true" />
<variable name="cancel" expression="" defaultValue="&quot;cancel&quot;" alwaysStopAt="true" />
<variable name="req" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="request" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="1" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="2" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="KOTLIN" value="true" />
</context>
</template>
<template name="us" value="val ($state$, set$State$, get$State$) = useGetState($default$)" description="useGetState" toReformat="false" toShortenFQNames="true">
<template name="us" value="val ($state$State, set$State$, get$State$) = useGetState($default$)&#10;val $state$ by $state$State" description="useGetState" toReformat="false" toShortenFQNames="true">
<variable name="state" expression="" defaultValue="&quot;state&quot;" alwaysStopAt="true" />
<variable name="State" expression="" defaultValue="capitalize(state)" alwaysStopAt="true" />
<variable name="default" expression="" defaultValue="" alwaysStopAt="true" />
Expand All @@ -39,7 +36,8 @@
<option name="KOTLIN_STATEMENT" value="true" />
</context>
</template>
<template name="uun" value="val (state, set, reset, undo, redo, canUndo, canRedo) = useUndo(initialPresent = &quot;&quot;)" description="useUndo" toReformat="false" toShortenFQNames="true">
<template name="uun" value="val ($state$State, set, reset, undo, redo, canUndo, canRedo) = useUndo(initialPresent = &quot;&quot;)&#10;val $state$ by $state$State" description="useUndo" toReformat="false" toShortenFQNames="true">
<variable name="state" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="KOTLIN_STATEMENT" value="true" />
</context>
Expand Down

0 comments on commit b18770b

Please sign in to comment.