-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
Description
Consider the following elements,
<p className="test1">Test text 1</p>
<p className="test2">Test text 2 <span>Test text 3</span> test text 4</p>I use deepMap over each element and console.log each child as it is iterated over. In the first case it only iterates over the <p> element.
In the second case it iterates over three elements: the "Test text 2" at the start, the <span> element and the "test text 4" at the end.
Is this the intended behaviour?
In the first case I would have thought that the "Test text 1" text was a child of the <p> tag, and therefore deepMap should recurse again over the "Test text 1" child.
In the second case I would have thought that deepMap should recurse into the "Test text 3" text inside the <span> element since I would have thought that the "Test text 3" text was a child of <span>.
jlarmstrongiv