You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see you are passing the children of <footer> to <manifest> as a prop, then have manifest send it back out as children of the <a>. The problem with this way is that children is an array of Elements presumably already in the DOM (or already appended somewhere). Whenever a component re-renders it produces a new set of elements, making the previous elements orphans. This is why the rest of the props are working while company is not showing, because it's was appended to your <a> element but appended again in an orphan <a>. This is more of the DOM's doing than Temple.
You can fix this in your manifest.tml by getting the textContent of the children instead like the following.
Kind of makes sense. Definitely agree that putting children back into the props is kind of weird. I was trying to see if it works :) your work around is acceptable.
What version of Temple are you using?
0.1.4
What OS are you experiencing this issue?
Mac
What Browser are you experiencing this issue?
Google Chrome Latest
Describe the Bug
So I have an import structure like the following:
index.dtml
, the page reloads (That's fine for now).footer.tml
, fast refresh also is working.manifest.tml
This is where fast refresh doesn't update the DOM correctly.If I refresh the page manually the DOM becomes correct again.
Expected Behavior
If I update a compoent that is imported by another component that is imported by a document, I expect that the DOM updates correctly.
To Reproduce
Here are all my templates.
page.dtml
footer.tml
manifest.tml
footer.tml
manifest.tml
Include git repo/fork so we can easily reproduce the issue
No response
The text was updated successfully, but these errors were encountered: