Insights
Sep 7, 2023

Next.js unravelled: a Q&A with James, one of our Senior Software Engineers

tagged with
A tag icon
Insight

What is Next.js, and how does it stand out?

James: Next.js is like a toolkit for website and app developers. It simplifies many complex tasks, incorporating best practices like fast loading times and search engine optimisation (SEO).

Unlike many traditional methods where you have to manually set up features like server-side rendering, Next.js automates this. This simplification allows developers to focus on the creative side, making it perfect for both small and big projects, which we’ll go into more detail on during this q&a too.

Photo by Christopher Gower on Unsplash

How does it empower app development?

James: Next.js presents an exciting opportunity for web-based applications, but it's essential to understand that its value depends on the specific context. While web apps have come a long way in matching the performance and user experience of native mobile apps, the choice between them ultimately depends on your unique needs.

For instance, we're currently immersed in a project tailored for tablet / iPad users. This scenario challenges the conventional approach of designing apps that work well on all devices. Instead, we're focusing on the unique capabilities and limitations of tablets, such as their screen size and different ways users interact with them. This means that certain features, like hover effects that work on desktops, aren't relevant for a significant portion of our users.

This user-centric approach aligns with a broader trend we're observing: a slowdown in global app downloads. It's possible that users are becoming more discerning, preferring a smaller number of high-quality apps. Combining this trend with the enhanced web experiences designed for mobile, web apps are becoming a more suitable choice in many cases. We conduct thorough research and testing before embarking on projects like these, recognising the significance of making the right platform choices.

Did you know?
Tons of really big websites use Next.js and React, like Hulu, Netflix, Twitch, TikTok and Uber.

Can you explain how Next.js impacts search rankings?

James: Next.js elevates your website's search engine optimisation (SEO) to a whole new level compared to traditional Single Page Applications (SPAs). Its secret sauce is server-side rendering, which means it provides content that search engines can easily read and understand, giving your site better visibility and a higher ranking.

But what truly sets Next.js apart is its flexibility in rendering content. It allows you to decide whether each page should be generated when the site is built or when a user requests it. This adaptability enables you to fine-tune each page based on its content and how users interact with it, leading to faster load times and a smoother user experience. These factors are crucial for SEO, as search engines reward faster websites with higher rankings.

Additionally, Next.js makes it efficient to update content without having to rebuild entire pages. This translates to even faster page loading, increased site speed, and an overall improved user experience. All of these aspects contribute significantly to higher search engine rankings.

James Kennedy, Senior Software Engineer

Next.js and React: are they really a match made in heaven?

James: Yes! While React by itself is a great library, Next.js complements it by providing a set of defaults and configurations that streamline the development process. You can deploy your application with zero configuration, yet the framework remains highly customisable to accommodate complex use-cases. Features like real-time preview and incremental static generation are not merely "nice to haves"; they fundamentally change the development workflow to the point where React now even recommends you use Next.js in conjunction with it!

There are tons of other features in the ecosystem which make them a perfect combo, like the ability to generate super fast production level websites for interactive and collaborative team feedback so you can test and iterate quickly. Because of this there is also a preview function so multiple team members or stakeholders can view releases immediately and remotely, because you can deploy build previews and push updates out instantly. This has been a real issue with other platforms since developers would need to have local code bases or be in the same physical location, but Next.js gives a full working version of the site for people to interact with as the build is progressing.

Additionally, there are some really awesome features around error checking so it’s really difficult to let simple bugs slip through the net which you then spend time combing through to fix. As it flags these bits as you go, it’s the perfect developer experience too, because you’re like ‘great, I can fix that now.’ And sometimes it even gives you autocomplete suggestions. Ultimately the code is much safer and way less error prone, saving a ton of time down the line.

There’s also a whole other aspect around using third party services like a headless CMS to drive the content for your website or application. A previous project we ran, Huckletree, used this really well alongside server-side rendering, and that gave us a range of low configuration tools to generate some cool features in a really efficient way so we could maximise on the project output.

Photo by Rodion Kutsaiev on Unsplash

What does the future of mobile app development with Next.js look like?

James: The trajectory of mobile app development is tilting towards greater efficiency and user-centric design. In this context, Next.js acts as a catalyst rather than a replacement for other methods. While it doesn’t inherently offer capabilities that are impossible to implement manually, it abstracts away many complexities, allowing developers to focus on business logic and user experience. This abstraction helps accelerate the time-to-market without compromising on performance or accessibility, which are increasingly becoming non-negotiable standards in the industry.

We are a progressive team of developers and UX experts and we love solving problems to create delightful digital experiences which do a bit of good for people and our planet. We actively stay at the forefront of technology stacks, innovation and best practice, and we’re always up for a new challenge.