question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After talking to @whaaaley and @andyrj, I think that I have misused the term “HMR” in creating hyperapp-hmr.

Put simply, HMR is supposed to make the changes become active the moment that you save the file.

Mine only does half this: It pushes all the state into the next session while everything else is reloaded underneath by your own initiative… This could be just hitting F5 and getting the same HMR benefits, or setting up an auto-reload server to get the entire HMR experience… However, the package by itself doesn’t technically give you “full HMR”.

Existing solutions like module.hot and browserify-hmr seem to be traditionally targeted at things where there is no single source of truth. But, because Hyperapp has this and can provide much cleaner solutions, I want to make a proposal of how we could document this alternative:

  1. Rename hyperapp-hmr or move it into hyperapp-persist/all.
  2. Document how to use this module alone and alongside livereload packages. For example:
    1. webpack-livereload-plugin
    2. rollup-plugin-livereload
    3. browserify-livereload (even made by one of us, @traducer!)
    4. Others?
  3. Setup minimalist examples of each build system using this approach.

Looking at hyperapp-persist and these livereload plugins, this seems like a really good alternative to me! But I understand some people prefer the workflows they are used to and might have less appeal to this. But, I’m still curious what everyone thinks, and I hope I have explained well.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:31 (23 by maintainers)

github_iconTop GitHub Comments

4reactions
whaaaleycommented, Jun 27, 2017

I agree with Jamen here. I think we should leverage hyperapp’s single state tree to do minimalistic state persistence and combine it with live reloading. If users are following the rules of hyperapp and have all of their state stored in hyperapp’s single state tree, then as far as they should be concerned this solution is equivalent to “traditional” hot module replacement.

If state persistence and livereload is the route that’s taken I think we should stray away from the term “HMR”. Even though it is a “household” term at this point, that is not what this is, but instead hyperapp’s take on the livereload and state persistence concept.

3reactions
lukejacksonncommented, Jul 10, 2017

FWIW I still call hot-reload “persist” in my head… because that is what it does, it ensures state persists between sessions. Does it incorporate live-reload, is that where I am getting confused?

Read more comments on GitHub >

github_iconTop Results From Across the Web

HMR
HMR is an award winning, clinically proven weight loss program offering optional free coaching, support, and delicious food delivered to your door.
Read more >
HMR Program | U.S. News Best Diets
The HMR (Health Management Resources) Program is a comprehensive weight-loss and lifestyle change program with two phases.
Read more >
HMR Designs - Wedding & Event Design & Décor Chicago
Innovative, original wedding and event design, décor + fabrication. Exquisite floral installations, custom furniture, experiential, scenic + branding.
Read more >
HMR Program - Home | Facebook
Rooted in behavioral science, our simple and effective program helps you lose weight quickly and build habits around healthy behaviors, so they can...
Read more >
HMR | 100 Years
A powerful search engine created specifically for the hardwood industry . . . ... Tracking price movement over a historical landscape can reveal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found