New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

diff-reload

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diff-reload

A lightweight JavaScript library for efficient partial DOM updates and seamless HTML streaming integration.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

Diff-Reload 🔄✨

A lightweight JavaScript library for efficient partial DOM updates and seamless HTML streaming integration.

Features

  • Smart DOM Diffing: Only updates the parts of the page that have changed, minimizing re-renders.
  • HTML Streaming Support: Works seamlessly with streaming HTML responses for faster perceived load times.
  • Transitions: Option to enable transitions of each HTML Streaming chunk via document.startViewTransition.

Installation

Via NPM

npm install diff-reload  

Via BUN

bun install diff-reload  

Usage

Basic Setup

Enable diffing on page updates:

import reload from 'diff-reload';  

await reload();  

With transitions

Enable transitions of each HTML Streaming chunk via document.startViewTransition:

import reload from 'diff-reload';  

await reload({ transition: true });  

Diffing Algorithm

Uses https://github.com/brisa-build/diff-dom-streaming diffing algorithm.

Contributing

See Contributing Guide and please follow our Code of Conduct.

License

MIT

FAQs

Package last updated on 26 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts