Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

prefresh

> 前端框架
Open source

Hot Module Reloading for Preact

389 stars0 likes2 views
WebsiteGitHub

About

Hot Module Reloading for Preact

Prefresh

Fast-refresh for Preact!

Integrations

  • @web/dev-server
  • gatsby
  • nollup
  • rolldown
  • vite
  • webpack

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.

javascript
export default () => {
  return 
Want to refresh
;
};

Instead do:

javascript
const Refresh = () => {
  return 
Want to refresh
;
};

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.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScripthmrhmr-enablerhmr-pluginhooks

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架