Skip to content
PricingBlog
✨ Markdown

Next.js

Next.js is a full-stack React framework.

Electric and Next.js

Next.js is based on React. Electric works with React. You can integrate Electric into your Next.js application like any other npm / React library.

Examples

Next.js example

We do not currently ship a maintained examples/nextjs app in this repository. The previous example was removed from main on April 23, 2026 after it fell behind the supported Next.js and React stack.

When integrating Electric with Next.js, the key pieces are:

  • Use the normal Electric React client patterns inside client components.
  • Proxy Electric through a Next.js route handler or other server-side endpoint so secrets stay on the server.
  • Handle writes through your own API and keep Electric on the read path.

The Next.js demo page remains as a historical deployment reference. For current implementation guidance, see the auth guide, shapes guide, and write patterns guide.

ElectroDrizzle

ElectroDrizzle is an example application by Leon Alvarez using Next.js, Drizzle, PGLite and Electric together.

See the Getting Started guide here.

SSR

Next.js supports SSR. We are currently experimenting with patterns to use Electric with SSR in a way that supports server rendering and client-side components seamlessly moving into realtime sync.

Help wanted Good first issue

We have a pull request open if you'd like to contribute to improving our Next.js documentation, patterns and framework integrations.

Please leave a comment or ask on Discord if you'd like any pointers or to discuss how best to approach this.