Next Super Performance screenshot

Next Super Performance

Author Avatar Theme by Lukasbombach
Updated: 26 Sep 2019
419 Stars

The case of partial hydration (with Next and Preact)

Categories

Overview

The Next Super Performance is a proof of concept for Next.js with partial hydration using Preact X. The goal is to improve client-side performance by reducing bundle size and only shipping necessary code to users, leaving the rest to server-side rendering. By utilizing Partial Hydration and implementing loading strategies like critical CSS and lazy loading, this plugin aims to enhance website performance significantly.

Features

  • Partial Hydration with Preact X: Utilize Preact X to reduce bundle size and enhance performance.
  • Custom Loading Strategies: Implement loading strategies such as critical CSS, critical JS, lazy loading, and preloading resources.
  • Plugin Integration: Easily integrate the Next Super Performance plugin into your Next.js project for improved client-side performance.

Installation

To install and utilize the Next Super Performance plugin, follow these steps:

  1. Install the next-super-performance package.
  2. Create a next.config.js file and use the plugin within it.
  3. Modify your package.json to ensure Next.js uses Preact properly.
  4. Include the necessary components in your application like HydrationData, withHydration, and hydrate to achieve partial hydration with full control.

For example, to integrate this plugin into your Next.js project, you can follow the steps mentioned in the documentation provided by the Next Super Performance repository.

Summary

The Next Super Performance plugin offers a solution for improving client-side performance in Next.js applications by implementing partial hydration with Preact X and custom loading strategies. By reducing bundle size and shipping only necessary code to the client, this plugin aims to enhance website performance and provide developers with more control over what is sent to users. Integration of the plugin is straightforward, requiring modifications in configuration files and utilizing specific components to achieve the desired performance optimizations.