+ p("But ", Symbol("Name2"), "'s implementation is more preferable. With ", Symbol("Name1"), "'s implementation, the entire ", InlineHtml("<p>"), " element will be refreshed whenever ", Symbol("name"), " state is updated. This is because the entire ", InlineHtml("<p>"), " element is bound to ", Symbol("name"), " state as specified in the binding function. On the other hand, with ", Symbol("Name2"), "'s implementation, the ", InlineHtml("<p>"), " element is only refreshed when ", Symbol("name"), " state is changed from empty to non-empty, or vice versa, as the ", InlineHtml("<p>"), " element is bound to derived state - ", Symbol("isNameEmpty"), ". For other changes to ", Symbol("name"), " state, only the ", Symbol("Text node"), " inside the ", InlineHtml("<b>"), " element will be refreshed."),
0 commit comments