Last active
April 9, 2024 20:50
WebStorm Live Template for Remix
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
<templateSet group="Remix"> | |
<template name="useFetcher" value="const $fetcher$ = useFetcher();" description="const fetcher = useFetcher()" toReformat="true" toShortenFQNames="true" useStaticImport="true"> | |
<variable name="fetcher" expression="" defaultValue=""fetcher"" alwaysStopAt="true" /> | |
<context> | |
<option name="JS_CLASS_MEMBER_STATEMENT" value="false" /> | |
<option name="JS_STATEMENT" value="true" /> | |
<option name="TS_CLASS_MEMBER_STATEMENT" value="false" /> | |
<option name="TS_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="loader" value="export async function loader({ $args$ }: LoaderFunctionArgs) { return json($END$); }" description="export async function loader({}: LoaderFunctionArgs)" toReformat="true" toShortenFQNames="true" useStaticImport="true"> | |
<variable name="args" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="TS_TOP_LEVEL_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="action" value="export async function action({ $args$ }: ActionFunctionArgs) { let error = false; $END$ if (error) { return json({ error: true }, { status: 503 }); } return redirect("$Path$"); }" description="export async function action({}: ActionFunctionArgs)" toReformat="true" toShortenFQNames="true" useStaticImport="true"> | |
<variable name="Path" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="args" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="TS_TOP_LEVEL_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="useActionData" value="const $data$ = useActionData<typeof action>();" description="const data = useActionData<typeof action>()" toReformat="true" toShortenFQNames="true"> | |
<variable name="data" expression="" defaultValue=""data"" alwaysStopAt="true" /> | |
<context> | |
<option name="TS_CLASS_MEMBER_STATEMENT" value="false" /> | |
<option name="TS_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="useLoaderData" value="const $data$ = useLoaderData<typeof loader>();" description="const data = useLoaderData<typeof loader>()" toReformat="true" toShortenFQNames="true" useStaticImport="true"> | |
<variable name="data" expression="" defaultValue=""data"" alwaysStopAt="true" /> | |
<context> | |
<option name="TS_CLASS_MEMBER_STATEMENT" value="false" /> | |
<option name="TS_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="useSearchParams" value="const [searchParams, setSearchParams] = useSearchParams();" description="const [searchParams, setSearchParams] = useSearchParams()" toReformat="true" toShortenFQNames="true" useStaticImport="true"> | |
<context> | |
<option name="JS_CLASS_MEMBER_STATEMENT" value="false" /> | |
<option name="JS_STATEMENT" value="true" /> | |
<option name="TS_CLASS_MEMBER_STATEMENT" value="false" /> | |
<option name="TS_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="clientLoader" value="export async function clientLoader({ request, params, serverLoader, }: ClientLoaderFunctionArgs) { $END$ return await serverLoader(); }" description="export async function clientLoader({}: ClientLoaderFunctionArgs)" toReformat="true" toShortenFQNames="true" useStaticImport="true"> | |
<context> | |
<option name="TS_TOP_LEVEL_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="clientAction" value="export async function clientAction({ request, params, serverAction, }: ClientActionFunctionArgs) { $END$ return await serverAction(); }" description="export async function clientAction({}: ClientActionFunctionArgs)" toReformat="true" toShortenFQNames="true" useStaticImport="true"> | |
<context> | |
<option name="TS_TOP_LEVEL_STATEMENT" value="true" /> | |
</context> | |
</template> | |
</templateSet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment