Easy to remember, atomic Remix snippets.
Intended for use in TypeScript projects.
Type rr: (short for remix.run) in a .ts or .tsx file to see corresponding snippets.
Snippets related to importing modules.
| Prefix | Description |
|---|---|
rr:imp |
Import common helpers, hooks & components |
rr:imp:types |
Import Remix provided type definitions |
rr:imp:util |
Import a module from ~/utils |
Snippets relating to typing data.
| Prefix | Description |
|---|---|
rr:type:LoaderData |
Type a route's loader data |
rr:type:ActionData |
Type a route's action data |
Snippets related to Remix hooks.
| Prefix | Description |
|---|---|
rr:use:loaderdata |
Assignment of useLoaderData's return value |
rr:use:d:loaderdata |
Destructured assignment of useLoaderData's return value |
rr:use:actiondata |
Assignment of useActionData's return value |
rr:use:d:actiondata |
Destructured assignment of useActionData's return value |
Snippets related to a route's loader.
| Prefix | Description |
|---|---|
rr:loader |
Define a route's loader |
rr:loader:json |
Return JSON using the json helper |
Snippets related to a route's action.
| Prefix | Description |
|---|---|
rr:action |
Define a route's action |
rr:action:file |
Define a route's file upload action |
rr:action:redirect |
Redirect from a route's action |
rr:action:redirect:o |
Redirect with options (custom status and/or headers) |
Snippets related to a route's headers
| Prefix | Description |
|---|---|
rr:headers |
Define a route's HTTP headers |
Snippets related to Remix's
CookieAPI
| Prefix | Description |
|---|---|
rr:cookie:create |
Create a cookie |