weareunderdesign / rnbw

design. develop. ship.
https://rnbw.dev
GNU General Public License v3.0
57 stars 13 forks source link

Content inside head tag like css, style, script don't update until the page is reloaded #779

Closed edenvidal closed 3 months ago

edenvidal commented 4 months ago

@atulbhatt-system32 can you describe?

atulbhatt-system32 commented 4 months ago

We use morphdom to update our stage automatically whenever we do any changes in our code. We use morphdom because it does dom-diffing internally and updates the stage without refreshing.

We can't process anything inside head tag using it. Changing JS is like restarting every JS that is loaded in the page everytime any change in the code is done related to it.

I tried to implement the same technique which I use to live refresh css by updating the url of css by appending a query param to it, but it doesn't work for JS.

@edenvidal

edenvidal commented 4 months ago

@atulbhatt-system32 recorded a video regarding js not having a choice but rendering the entire page - which is actually a good thing! let's do that. and re-render the entire page, and deal with the issues that may come with it like "selection". see recorded video.

edenvidal commented 3 months ago

@atulbhatt-system32 what's our status with this? thanks 🙏

atulbhatt-system32 commented 3 months ago

@edenvidal Now this works!! The script tag reload and for others it refreshes