All Projects → JoviDeCroock → Prefresh

JoviDeCroock / Prefresh

Licence: mit
Hot Module Reloading for Preact

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Prefresh

preact-urql
Preact bindings for urql
Stars: ✭ 28 (-88.66%)
Mutual labels:  hooks, preact
My React Hooks
React/Preact/Orby.js Hooks I used in personal projects, all in public domain form. Copy and paste or do as you wish.
Stars: ✭ 14 (-94.33%)
Mutual labels:  hooks, preact
React Colorful
🎨 A tiny (2,5 KB) color picker component for React and Preact apps
Stars: ✭ 951 (+285.02%)
Mutual labels:  hooks, preact
Koa Webpack Middleware
webpack dev&hot middleware for koa2
Stars: ✭ 215 (-12.96%)
Mutual labels:  hmr
Facebook Political Ads
Monitoring Facebook Political Ads
Stars: ✭ 215 (-12.96%)
Mutual labels:  preact
Use Position
🌍 React hook usePosition() for fetching and following a browser geolocation
Stars: ✭ 230 (-6.88%)
Mutual labels:  hooks
Minimal React Starter
As minimal a react starter as you can get... while also using ES6/Babel and Webpack.
Stars: ✭ 246 (-0.4%)
Mutual labels:  hmr
Masonic
🧱 High-performance masonry layouts for React
Stars: ✭ 209 (-15.38%)
Mutual labels:  hooks
Helix
A simple, easy to use library for React development in ClojureScript.
Stars: ✭ 235 (-4.86%)
Mutual labels:  hooks
React Hooks Helper
A custom React Hooks library that gives you custom hooks for your code.
Stars: ✭ 227 (-8.1%)
Mutual labels:  hooks
Use Undo
React Hooks to implement Undo and Redo functionality
Stars: ✭ 224 (-9.31%)
Mutual labels:  hooks
React Native Swiper Flatlist
👆 Swiper component implemented with FlatList using Hooks & Typescript + strict automation tests with Detox
Stars: ✭ 217 (-12.15%)
Mutual labels:  hooks
Use Expo
Complementary hooks for Expo
Stars: ✭ 233 (-5.67%)
Mutual labels:  hooks
Hydux
A light-weight type-safe Elm-like alternative for Redux ecosystem, inspired by hyperapp and Elmish
Stars: ✭ 216 (-12.55%)
Mutual labels:  preact
Rex Tils
Type safe utils for redux actions, epics, effects, react/preact default props, various type guards and TypeScript utils, React util components
Stars: ✭ 245 (-0.81%)
Mutual labels:  preact
Preact Custom Element
Wrap your component up as a custom element
Stars: ✭ 212 (-14.17%)
Mutual labels:  preact
React
MOVED TO https://github.com/myitcv/x/blob/master/react/_doc/README.md
Stars: ✭ 234 (-5.26%)
Mutual labels:  preact
React Native Easy Starter
A react-native starter kit using RN0.63, Flipper support, LogBox, AndroidX, Hooks workflow, easy-peasy, code-push, Themes support and much more
Stars: ✭ 224 (-9.31%)
Mutual labels:  hooks
Resolvers
📋 Validation resolvers: Zod, Yup, Joi, Superstruct, and Vest.
Stars: ✭ 222 (-10.12%)
Mutual labels:  hooks
React Starter Kit
React, Redux, Webpack, Material UI, Boostrap 4, Code Splitting, HMR
Stars: ✭ 229 (-7.29%)
Mutual labels:  hmr

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 or @prefresh/next with IE11, you'll need to transpile the @prefresh/core and @prefresh/utils packages.

For Next.js you can install next-transpile-modules and add the following code snippet to your next.config.js.

const withTranspiledModules = require('next-transpile-modules')([
  '@prefresh/core',
  '@prefresh/utils',
]);

module.exports = withTM({
  /* regular next.js config options here */
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].