DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk4 min

A Missing ‘use client’ Shipped 165 Games to Play One of Them

A missing 'use client' directive reportedly undermined per-game loading on one Next.js route. The fix moved the game registry lookup into a Client Component while keeping checks on the server.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A Next.js game route reportedly sent about 2.6 MB of JavaScript on its first load—even though a player needed only one of 165 games. Daniel Pertu traced the issue to where the game registry sat in the Server/Client Component module graph, not to a general failure of next/dynamic. His proposed fix was to move game selection into a small Client Component and pass it the chosen game ID from the server.

What went wrong in this app

Pertu describes a practice site with 165 playable games, each implemented as a React component with its own engine and state; some games use canvas. A registry mapped each game ID to a next/dynamic import. Yet the /games/<id> route reportedly had a first load of about 2.6 MB of JavaScript. These are figures from Pertu’s account of one application, not a controlled benchmark or a general measure of Next.js performance. Read Pertu’s account on DEV Community.

As an Amazon Associate I earn from qualifying purchases.

His diagnosis was that the registry had no 'use client' directive and was imported by a Server Component page. Because the registry performed runtime selection among the client game components, Pertu says the build did not preserve the per-game isolation he expected from the dynamic imports. That explains his app as he reported it; it is not a universal rule for every Next.js version, bundler, or module graph.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why the client boundary matters

In Next.js, 'use client' marks a client entry point and establishes a boundary between the server and client module graphs. It belongs on files that serve as entry points rendered directly from Server Components; it does not need to be repeated in every component file. Modules imported beneath a client entry point become part of the client bundle, so an unnecessarily broad boundary can bring more code into that bundle. The directive is therefore about which graph a module belongs to—not simply whether a file contains React components. Next.js: 'use client' and Next.js: Server and Client Components.

#1 Best Overall
Marvel vs. Capcom Fighting Collection: Arcade Classics - Nintendo Switch
  • Experience your Favorite MARVEL vs. CAPCOM classics All in One – Enjoy 7 of your favorite classic titles that helped shaped the MARVEL vs. CAPCOM universe both single player and online.
  • Enjoy Enhanced Features Added to the Classic Collection – To enhance your playability experience, we incorporated the favorite added features from Capcom Fighting Collection including gallery mode, quick save, training mode for all fighting titles, and the high score challenge. Beginners and first timers into the franchise are also welcome to play through adjusted settings and execution of one-button specials!
  • Play with Friends Worldwide through Online Compatibility – This collection also includes rollback net code for a smooth and enjoyable experience online. Play casually or competitively through casual, ranked, or custom matches using rules of your choosing!

next/dynamic can lazy-load Client Components and imported libraries, helping reduce the JavaScript needed for a route. But it is a loading mechanism, not a guarantee that any runtime registry will produce one isolated chunk per possible choice. The result depends on the actual module graph and build, so verify what the production app emits and requests. Next.js: Lazy Loading.

The proposed fix: let the client resolve the game

Pertu’s change moves the registry into the client module graph by adding 'use client', then puts the dynamic lookup in a small GameRunner Client Component that accepts a game ID. The Server Component page can still resolve the requested game, perform access and play-budget checks, and create metadata before rendering GameRunner. The client uses the ID to select and load the interactive game implementation.

Rank #2
Sale
Star Wars: Heritage Pack - Nintendo Switch
  • The following games are included in the cartridge: STAR WARS Jedi Knight: Jedi Academy (3.6 GB)
  • STAR WARS Jedi Knight II: Jedi Outcast (1.1 GB)
  • STAR WARS Episode I Racer (254 MB)
  • STAR WARS Republic Commando (2.5 GB)
  • STAR WARS: The Force Unleashed (3.4 GB)

This division keeps server responsibilities on the server while moving client-side component resolution to the client. A Server Component cannot call a lookup function from a client-side registry as though that registry were server code: as Pertu puts it, “A Server Component can no longer call getGameComponent. Pass the game id to GameRunner instead.” The ID passed as a prop must be serializable, as required when passing props across the Server/Client Component boundary. The precise split should match the app’s data and security model.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A short code comment can preserve the reason for the design: server callers pass an ID rather than importing a component from the client-side registry. That makes the boundary intentional and helps prevent a later refactor from putting lookup in the wrong graph.

Rank #3
Sale
FINAL FANTASY I-VI Collection Anniversary Edition - 2024 (NSW)
  • The games that inspired a generation come to life once more, in the ultimate 2D pixel remaster!
  • These games are newly developed remaster editions based on the original titles. Some of the changes and additional elements found in other remakes of these games are not included.
  • The Anniversary Edition includes a pixel character sticker sheet.
  • Universally updated 2D pixel graphics, including the iconic FINAL FANTASY character designs created by Kazuko Shibuya, the original artist and current collaborator.
  • Beautifully rearranged soundtrack in a faithful FINAL FANTASY style, overseen by original composer Nobuo Uematsu.

How to check whether a route is loading too much

  1. Build for production. Run next build and inspect the route information and bundle measurements available in your build output or configured bundle analyzer. Next.js documents this command as producing an optimized production build with route information. Output columns and available tooling can differ by release and build mode, so compare like with like. Next.js CLI: next.
  2. Inspect browser requests. Load the affected route and use the browser’s Network panel to review JavaScript requests. For a registry intended to load one game on demand, check whether the route loads its own chunks first and whether the selected game’s chunk is requested when the runner mounts. Pertu describes this check for his site; it is not an independently verified test of the site here.
  3. Compare the payload with the route’s needs. Look at the requested files and their sizes in the context of the feature being used. A size increase after an unrelated feature is added can be a useful clue, but it does not by itself prove a client-boundary problem.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What this incident does—and does not—show

  • It shows how the placement of a client entry point can affect whether a runtime-selectable component registry is included and loaded as intended.
  • It does not establish that next/dynamic is ineffective. Next.js documents it as a way to lazy-load Client Components and imported libraries; the output still needs to be checked in the specific production build.
  • The reported 165 games and roughly 2.6 MB first load are specific to Pertu’s app and account. The article provides no measured post-fix size, percentage improvement, or independent benchmark.

Pertu’s summary is apt for this case: “next/dynamic is not a promise, it is a request.” The practical lesson is to make the server/client boundary match the work each side should do—and confirm the result in the built application.

Quick Recap

SaleBestseller No. 2
Star Wars: Heritage Pack - Nintendo Switch
Star Wars: Heritage Pack - Nintendo Switch
STAR WARS Jedi Knight II: Jedi Outcast (1.1 GB); STAR WARS Episode I Racer (254 MB); STAR WARS Republic Commando (2.5 GB)
$35.48
SaleBestseller No. 3
FINAL FANTASY I-VI Collection Anniversary Edition - 2024 (NSW)
FINAL FANTASY I-VI Collection Anniversary Edition - 2024 (NSW)
The Anniversary Edition includes a pixel character sticker sheet.; Improved gameplay, including modernized UI, auto-battle options, and more!
$47.99
Rank #4
Mega Man Star Force Legacy Collection - PlayStation 5
  • The Mega Man Star Force Legacy Collection includes Mega Man Star Force Pegasus, Mega Man Star Force Leo, Mega Man Star Force Dragon, Mega Man Star Force 2 Zerker x Ninja, Mega Man Star Force 2 Zerker x Saurian, Mega Man Star Force 3 Black Ace & Mega Man Star Force 3 Red Joker.
  • Browse over 1,000 pieces of official artwork, including rare concept illustrations. You can also rock out to music from all three Mega Man Star Force titles plus newly arranged tracks, with select tracks that can be set as in-game background music.
  • Customize gameplay by increasing your Mega Buster power, adjusting encounter rates, and playing through Casual for easy play or Ranked Matches for global competition.
  • Optional high-resolution filters allow you to enjoy smoother visuals or toggle them off at any time to experience the classic look.
  • Rare bonus cards previously obtainable only through events or merchandise are included. You can also combine them with cards earned during gameplay to build even more powerful decks (some bonus cards are not included).

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.