Skip to content

Sanshain/prefresh

This branch is 2 commits ahead of, 20 commits behind preactjs/prefresh:refs/heads/main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b8181d4 · May 20, 2024
May 20, 2024
Jun 25, 2023
May 8, 2023
May 20, 2024
Nov 17, 2023
May 1, 2020
May 9, 2023
Dec 11, 2020
May 21, 2021
May 8, 2023
May 7, 2023
Jun 25, 2023
Dec 11, 2020
Jun 25, 2023
May 19, 2024
May 8, 2023

Repository files navigation

Prefresh

Fast-refresh for Preact!

Integrations

Writing your own integration

Best practices

Recognition

We need to be able to recognise your components, this means that components should start with a capital letter and hook should start with use followed by a capital letter. This allows the Babel plugin to effectively recognise these.

Do note that a component as seen below is not named.

export default () => {
  return <p>Want to refresh</p>;
};

Instead do:

const Refresh = () => {
  return <p>Want to refresh</p>;
};

export default Refresh;

When you are working with HOC's be sure to lift up the displayName so we can recognise it as a component.

Usage in IE11

If you want to use @prefresh/webpack with IE11, you'll need to transpile the @prefresh/core and @prefresh/utils packages.

About

Hot Module Reloading for Preact

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.3%
  • Other 0.7%