Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

withMappable wraps React component with an additional div

Avatar

Level 1

Whenever we are using withMappable in our React SPA, that component is wrapped with an additional div.

 

Example:-

withMappable of Test component results in the following DOM tree,

 

.

.

.

div (the additional div which was not added by us)

  Test

div

.

.

.

 

Is there any way to configure withMappable to not wrap our component with an additional div? 

2 Replies

Avatar

Community Advisor

Hi,

Is it in only in Author or see div in the publish as well?

Arun Patidar

AEM LinksLinkedIn

Avatar

Level 1

The extra wrapping div can be seen in both the publish and author instances.

 

The extra wrapping div, you see is being added by the withMappable function and not by us in our React SPA. Moreover, at the end of the div, there is an empty div. (<div></div>)

 

suryanshABG_0-1683782090727.png