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 have an application that involves a list of embedded videos (in iframes) where the user can choose to hide any of them individually. I noticed that when I hid one of them, all the iframes after it in the list would get reloaded. Naturally I reached for a keyed node to solve this problem, but low and behold, it did not change anything. After talking with Nate Faubion on discord, it turns out that the current keyed node diffing algorithm still moves things around more than I expected it to, and when an iframe is moved, it gets reloaded. I learned functional UI in Elm originally, so this behavior surprised me. I checked if Elm behaved the way I expected it to, and it did. Nate said that the current algorithm was made not to minimize DOM manipulation, but to satisfy other design goals. I'm curious if getting this diffing on par with Elm, or at least fixing the iframe issue is something the project would currently be open to.
I have an application that involves a list of embedded videos (in iframes) where the user can choose to hide any of them individually. I noticed that when I hid one of them, all the iframes after it in the list would get reloaded. Naturally I reached for a keyed node to solve this problem, but low and behold, it did not change anything. After talking with Nate Faubion on discord, it turns out that the current keyed node diffing algorithm still moves things around more than I expected it to, and when an iframe is moved, it gets reloaded. I learned functional UI in Elm originally, so this behavior surprised me. I checked if Elm behaved the way I expected it to, and it did. Nate said that the current algorithm was made not to minimize DOM manipulation, but to satisfy other design goals. I'm curious if getting this diffing on par with Elm, or at least fixing the iframe issue is something the project would currently be open to.
Comparisons
The text was updated successfully, but these errors were encountered: