From e864f103f10f4c4d6ab902676c1453f0e3583c65 Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Tue, 23 Jul 2024 21:27:50 +0200 Subject: [PATCH] add comments --- src/diff/index.js | 2 +- test/browser/render.test.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/diff/index.js b/src/diff/index.js index 7f88ce8e83..b5483662a8 100644 --- a/src/diff/index.js +++ b/src/diff/index.js @@ -435,7 +435,7 @@ function diffElementNodes( oldProps = oldVNode.props || EMPTY_OBJ; - // TODO: do we want to keep this in v11? + // TODO: do we want to keep this in v11? Bigger question right now // If we are in a situation where we are not hydrating but are using // existing DOM we should read the existing DOM attributes to diff them if (!isHydrating && excessDomChildren != null) { diff --git a/test/browser/render.test.js b/test/browser/render.test.js index bb2c2d4adb..8511280e93 100644 --- a/test/browser/render.test.js +++ b/test/browser/render.test.js @@ -1217,6 +1217,7 @@ describe('render()', () => { } }); + // Would break if we remove the mutative render props removal it('should remove attributes on pre-existing DOM', () => { const div = document.createElement('div'); div.setAttribute('class', 'red');