fullstory-babel-plugin-annotate-react icon indicating copy to clipboard operation
fullstory-babel-plugin-annotate-react copied to clipboard

Some Components Not Annotated

Open amcdnl opened this issue 4 years ago • 1 comments

In my project, some of the components are not getting annotated. If you see this snapshot:

image

The div element with class name is Nav_container is a component. I'm wondering if that is because the dom structure has a fragment rather than a DOM element:

const Nav = () => (
  <Fragment>
     <div className="Nav_container" />
  </Fragment>
);

I understand the issue is you need something to attach to and since a fragment isn't a real element you have nothing to attach to but...I'm thinking you could solve this in a few different ways:

  • You could attach the attributes to the children of the fragment
  • You could attach the attributes to ALL children until you hit another component and so on...

amcdnl avatar Dec 16 '20 21:12 amcdnl

Another great catch. Thanks for surfacing this and for the suggested fixes.

patrick-fs avatar Dec 18 '20 01:12 patrick-fs