Socket
Socket
Sign inDemoInstall

@prefresh/core

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prefresh/core

[![npm version](https://badgen.net/npm/v/@prefresh/core)](https://www.npmjs.com/package/@prefresh/core)


Version published
Maintainers
3
Created
Source

Prefresh-core

npm version

We are still fleshing out the details on how to go about this approach best for Preact, we'd love to give you the best reloading experience possible.

Note that now the refreshing component will dispose of its hookState to reload in case of added hook, ... this to ensure consistency.

How to use

This plugin will set up a series of hooks onto the webpack instance, so the first thing to do is ensure that this package is part of your entries.

This will add a method on the window window.__PREFRESH__.replaceComponent, this function expects two arguments. The first being the old class/function and the second the new one.

This will go over all vnodes it knows for the oldType and rerender them according to the NewType.

FAQs

Package last updated on 01 Oct 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc