withMappable wraps React component with an additional div | Community
Skip to main content
May 9, 2023

withMappable wraps React component with an additional div

  • May 9, 2023
  • 1 reply
  • 703 views

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? 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

arunpatidar
Community Advisor
Community Advisor
May 9, 2023

Hi,

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

Arun Patidar
May 11, 2023

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>)