preact
This commit is contained in:
parent
6acf267d48
commit
b7614eb3f8
4794 changed files with 1280808 additions and 1546 deletions
19
frontend/node_modules/@prefresh/core/README.md
generated
vendored
Normal file
19
frontend/node_modules/@prefresh/core/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Prefresh-core
|
||||
|
||||
[](https://www.npmjs.com/package/@prefresh/core)
|
||||
|
||||
We are still fleshing out the details on how to go about this approach best for [Preact](https://github.com/preactjs/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`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue