next-tools
TypeScript icon, indicating that this package has built-in type declarations

0.0.13 • Public • Published

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>;
};

Readme

Keywords

none

Package Sidebar

Install

npm i next-tools

Weekly Downloads

13

Version

0.0.13

License

MIT

Unpacked Size

28.2 kB

Total Files

12

Last publish

Collaborators

  • ian_