Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot reloading #34

Open
lmatteis opened this issue Feb 27, 2017 · 4 comments
Open

Hot reloading #34

lmatteis opened this issue Feb 27, 2017 · 4 comments

Comments

@lmatteis
Copy link
Member

Someone on gitter pointed out that hot reloading isn't possible with redux-cycles. We should have a solution for this. Tagging this as enhancement

@lmatteis
Copy link
Member Author

An interesting approach to hot-reloading would be to mock all side effects when calling Cycle.run. For instance during development you don't actually want to perform certain HTTP request - GET requests you may want them to go through, but not POSTs/PUTs.

There could be a way to pass a HOD (high order driver) that wraps HTTP driver and filters POSTs/PUTs request to not contact server; but just return mock data-- so the UI can be used without modifying server-state.

@goshacmd
Copy link
Collaborator

goshacmd commented Mar 1, 2017

In general, isn't hot reloading of any Redux side-effect approach a huge pita? Both sagas and cycles can have local, implicit state which can make hot-reloading useless in many cases even if cycles can be rebooted.

An alternative could be to keep track of action history and replay on hot reload, but this can be problematic as well... because changes in cycles can now change the past.

@lmatteis
Copy link
Member Author

lmatteis commented Mar 1, 2017

Wondering whether https://github.com/Widdershin/cycle-restart will work

@Widdershin
Copy link
Member

You could probably adapt cycle-restart for this usecase, it might just work™.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants