Détail du package

@prefresh/core

preactjs516.5kMIT1.5.5

The core logic for prefresh.

readme

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.

changelog

@prefresh/core

1.5.5

Patch Changes

1.5.4

Patch Changes

1.5.3

Patch Changes

1.5.2

Patch Changes

1.5.1

Patch Changes

1.5.0

Minor Changes

1.4.1

Patch Changes

1.4.0

Minor Changes

1.3.4

Patch Changes

1.3.3

Patch Changes

1.3.2

Patch Changes

1.3.1

Patch Changes

1.3.0

Minor Changes

  • 21f8c43 #243 Thanks @JoviDeCroock! - Invalidate useEffect/useLayoutEffect/useMemo/useCallback without resetting hook-state aggressively, now hook-state will only be reset for stateful hooks.

1.2.0

Minor Changes

1.1.1

Patch Changes

1.1.0

Minor Changes

1.0.0

Major Changes

0.8.1

Patch Changes

0.8.0

Minor Changes

0.7.4

Patch Changes

0.7.3

Patch Changes

0.7.2

Patch Changes

0.7.1

Patch Changes

0.7.0

Minor Changes

Patch Changes

0.6.2

Patch Changes

0.6.1

  • Remove invalid webpack peerDependency

0.6.0

  • Added computeKey and register to the window payload
    • computeKey will calculate a hash for functional components and custom hooks this will allow you to derive the need for resetting state or not.
    • register is a noop that might be used later
  • Added a third parameter to replaceComponent allowing the user to specify whether or not the stat has to be reset.