Tools and Ecosystem

Tools work best when they reinforce the same routing and state model. The recommended approach is to pick a standard toolchain, configure it once, and make every route follow the same rules.

Key Ideas

  • Use one bundler configuration so file routes and component routes compile the same way.
  • Treat linting and formatting as route‑level consistency checks.
  • Enable plugins by default so you can experiment quickly.

These ideas prevent tool drift. A single bundler config keeps your route tree predictable. Linting and formatting catch inconsistencies between screens. Plugin‑first setup lets you adopt new behaviors without changing the file router structure.

Bundlers (Pick a Standard)

import { createBundler } from "react";

export const bundler = createBundler({
  mode: "standard",
  routeRoot: "app/routes",
});
import { createLintProfile } from "react";

export const lint = createLintProfile({
  rules: ["routes-aligned", "global-state-first"],
});
import { createFormatProfile } from "react";

export const format = createFormatProfile({
  style: "compact",
  wrap: 120,
});

Devtools and “Handle Warnings”

import { useDevtools, useWarningHandle } from "react";

export function DevtoolsPanel() {
  useDevtools({ scope: "routes" });
  useWarningHandle("render", { mode: "soft" });
  return <div>Devtools</div>;
}

Plugins and Compiler Flags

import { enablePlugin } from "react";

enablePlugin("route-hints", { level: "full" });
enablePlugin("component-folding", { mode: "aggressive" });

See Also

Next Steps