remix

Remix Defaults

Core Remix patterns and conventions

Details

Language / Topic
javascriptJavaScript
Category
framework
Compatible Frameworks
remix

Rules

balanced

Remix

- Use `loader` for server-side data fetching and `action` for mutations — both run only on the server. Use `useLoaderData()` and `useActionData()` with TypeScript for type-safe data access. Let Remix handle forms with native `<Form>` component.

Remix

- Use `loader` for server-side data fetching and `action` for mutations — both run only on the server. Use `useLoaderData()` and `useActionData()` with TypeScript for type-safe data access. Let Remix handle forms with native `<Form>` component.
- Use `defer()` with `<Await>` for streaming slow data alongside fast data. Use `redirect()` in actions after successful mutations. Implement optimistic UI with `useNavigation()` and `useFetcher()`. Use `ErrorBoundary` and `CatchBoundary` at route level for granular error handling. Nested routes share layouts and data automatically.