Skip to content

ian/next-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

next-tools

The missing utility belt for Next.js.

Quickstart

Install next-tools and dependencies:

npm i next-tools

API Reference

DisableSSR

Component to disable SSR.

const MyComponent = () => {
  return (
    <DisableSSR>
      <p>This will only be rendered in the client.</p>
    </DisableSSR>
  );
};

SafeHydrate

Component to suppress hydration warnings from Next.js.

Next.js will complain about server rendered hydration being different than client.

const MyComponent = () => {
  return <SafeHydrate>{new Date().toISOString()}</SafeHydrate>;
};

About

The missing utility belt for Next.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published