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.

Time-travel and hot reloading

See original GitHub issue

Suppose we have a saga to handle authentication of an user like in your example.

What bothers me is that I’m not sure the behavior would be correct when associated with time-travel debugging. I mean if the saga has an initial variable let userConnected = false, then the user connects so userConnected = true, and then we time travel back to the beginning. Here the saga will still have userConnected = true right?

But I’m not sure it’s actually a problem as this project is a middleware and what I understand of Redux devtools is that during time travel the actions do not go through the middleware chain again so the saga would not change state.

What about hot reloading of Saga code? I’m not sure here it will work at all either but not sure it is really possible to do something nice about it right?

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:8
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

15reactions
gaearoncommented, Feb 29, 2016

If hot-reloading of the saga only affects the future I’ll be fine with that.

I agree. Just pausing existing sagas and restarting hot reloaded ones would cover most cases where you’d care about hot reloading them, in my opinion. Sure, it’s not perfect, but it’s better than nothing, isn’t it?

5reactions
slorbercommented, Dec 30, 2015

I’m more concerned about state that the sagas have. I mean if you have a long-lived saga and it uses local variables, then when we time-travel it’s not easy to update this state accordingly, and worse the saga also has some kind of “progress state” (I mean at which execution point the Saga is currently).

Generators seems to allow an user-friendly syntax but also seems to introduce some kind of implicit state and I don’t really see how to deal with that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hot Reloading with Time Travel at react-europe 2015 - YouTube
React's unique strength is bringing to JavaScript development some of the benefits previously exclusive to more radically functional ...
Read more >
Hot reloading and time travel debugging: what are they?
Hot reloading lets you keep your state even after code changed. With time travel debugging, you can go backwards to previous points in...
Read more >
Live React: Hot Reloading with Time Travel - Awesome React
Live React: Hot Reloading with Time Travel · Keynote · Inline Styles: themes, media queries, contexts, & when it's best to use CSS...
Read more >
React Hot Reloading Time Travel libraries
Showing projects tagged as Hot Reloading and Time Travel ... 9.3 9.2 TypeScript. DevTools for Redux with hot reloading, action replay, and customizable...
Read more >
Introduction to time travel debugging | by Jon Kuperman
Hot reloading means swapping, adding, or removing modules while an application runs without a full reload. · Step-through debugging allows you to “break”...
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