A critical requirement for Hulu was server-side rendering. With data coming from many sources and a fundamental need for SEO, server-side rendering was a must. With other frameworks, server-rendering pages with complex data dependencies is difficult and error prone, if not impossible. Next.js however made the process straightforward.
“[Server rendering] was as easy as moving data fetching from one spot to another. Next.js dealt with the underlying client hydration, while giving us a single abstraction to handle our data fetching logic.”— Zack Tanner
Even when issues arose, Zack found that error tracing with server-rendered pages was far superior compared to any other solution he'd tried. By acting as a unified tool for managing both client and server-side rendering, Next.js makes it easy for developers to tap into the rich benefits of server-side rendering, while still working in familiar territory of writing client side code.
Finally, by using the CSS-in-JS solution that Next.js provides by default, Zack and team were able to implement optimized styles that were code-split automatically. This meant each page would load only the CSS it needed, keeping page-size small without compromising on functionality. The Hulu teams also extended these defaults using sanctioned
next-plugins, enhancing their setup to support existing global Sass files with minimal overhead.
One Framework for Everyone
Adopting Next.js early on in its history required writing lots of custom code to deal with the team's specific use cases. However, as the ecosystem evolved, they were able to chip away at old abstractions and let Next.js handle them directly.
As the migration progressed, a large amount of technical debt tapered, but another powerful benefit arose. The frontend teams at Hulu were unified around a single platform, reducing the time it would take developers to be productive in a new codebase. Zack confirms, "devs would come and go and switch teams, but everyone understands Next. Everyone is on the same page." The number of operational wins Hulu earned were on par with the technical ones.