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

Should implement a `refreshAllClientJS' function in the refresher #18

Open
leonli opened this issue Nov 4, 2015 · 1 comment
Open

Comments

@leonli
Copy link

leonli commented Nov 4, 2015

https://github.com/patrick-steele-idem/browser-refresh/blob/master/lib/client/refresher.js

I would suggest to implement the client JS refresher, this could help the user to call this function in browser-refresh-client after filtering out the client/*.js, so that the users could enjoy the fast changes for their client JS without refreshing the page. ;)

Any idea for my suggestion?

@cactysman
Copy link

Hot-reloading JS on pages sounds like a nice idea but that would quickly turn into hell on earth.

Just think of constants for a second, this action would try to redefine them which doesn't make sense.
Scripts that change parts of the site would run again and run into errors as whatever the initial state of the page should have been is not what the script encounters.

Of course I could go on and of course we could define what explicitly should be allowed to be reloaded, but still I think this doesn't make any sense at all.

JS is not like CSS.

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

No branches or pull requests

2 participants