Skip to content

Commit

Permalink
Update blog post and app for new fog of war flag name
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Jul 18, 2024
1 parent 719ab95 commit bf2e274
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions data/posts/fog-of-war.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ authors:
- Matt Brophy
---

Remix is designed to make your application performant by default. Our latest feature, [Fog of War][remix-fog-of-war][^1], helps your application stay performant no matter how large it grows.
Remix is designed to make your application performant by default. Our latest feature, [Fog of War][remix-fog-of-war][^1] (a.k.a. "Lazy Route Discovery"), helps your application stay performant no matter how large it grows.

[^1]: The Fog of War feature was released behind an `unstable` flag in Remix [v2.10][remix-2-10] for early beta testing—we hope to stabilize it in an upcoming release

_Note: This was released behind the `future.unstable_fogOFWar` flag in v2.10, but the flag was renamed to `future.unstable_lazyRouteDiscovery` in v2.11. We found that without the context behind "Fog of War" we discuss in this post, the flag naming could be a bit confusing 🙂._

## How Remix Makes Fetch(es) Happen

Remix has primarily been a compiler and server-runtime on top of React Router aimed at giving you the idiomatic and performant way we would have written a React Router SSR app. Could you build your own React Router SSR application without using Remix? Absolutely! However, to get the same kind of performance optimizations, you'd very likely end up writing your own compiler and server-runtime, mimicking a lot of the optimizations Remix has built-in.
Expand Down Expand Up @@ -93,7 +95,7 @@ Prior to v1.0, Remix actually worked this way! Only the initial routes were incl

But, as you can see, that approach leads to a network waterfall—and we hate those! It also means we can't implement `<Link prefetch>` anymore because we don't even have the routes to match, let alone their metadata for fetching data and modules.

So for Remix 1.0 the full manifest was shipped to eliminate waterfalls and allow link prefetching. The "partial manifest" optimization was left for another day - and that day finally came in Remix [v2.10][remix-2-10] with the release of the `future.unstable_fogOfWar` flag.
So for Remix 1.0 the full manifest was shipped to eliminate waterfalls and allow link prefetching. The "partial manifest" optimization was left for another day - and that day finally came in Remix [v2.10][remix-2-10] with the release of the `future.unstable_lazyRouteDiscovery` flag.

## Eager Route Discovery

Expand Down
2 changes: 1 addition & 1 deletion vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export default defineConfig({
arraybuffer(),
remix({
future: {
unstable_lazyRouteDiscovery: true,
unstable_singleFetch: true,
unstable_fogOfWar: true,
},
}),
],
Expand Down

0 comments on commit bf2e274

Please sign in to comment.