How to prevent re-render of Hook/Web components? #56
-
@alfonsogarciacaro With your sample TodoMVC, assume that there's a web socket that keeps updating the list model. How would one prevent the specific item to not re-render while it's in edit mode? The todo items gets getting re-rendered on every change, so it prevents me from editing a todo. Do I need another logic to prevent the entire list to not render? What if I need to re-render everything except the one in the edit mode? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Heh, silly me. I go back to how Lit determines how it re-renders. I was using |
Beta Was this translation helpful? Give feedback.
Heh, silly me. I go back to how Lit determines how it re-renders. I was using
GetHashCode()
as its unique identifier and that one keeps changing.