fullstorydev / fullstory-babel-plugin-annotate-react

A Babel plugin that annotates React components, making them easier to target with FullStory search
MIT License
30 stars 13 forks source link

Fragments still getting (attempted) annotations #36

Open jarredt opened 3 years ago

jarredt commented 3 years ago

I am seeing warnings on both the native and web versions of our app that Fragment elements are being given dataElement props. I have tried without specifying any "annotate-fragments" setting, setting it to false, and setting it to true, but I get the warning no matter what.

Screen Shot 2021-04-14 at 11 48 35 AM Screen Shot 2021-04-14 at 11 48 18 AM

rcmaples commented 2 years ago

Hi there @jarredt, RC here with FullStory's support engineering team. We're not set up to troubleshoot issues via Github issues currently. If you're still running into issues here can you reach out to mobile-support@fullstory.com? We'll be more than happy to help out.

Thanks so much!

shaunp-street commented 1 year ago

For anyone googling around trying to find a solution to this, add the following

[ '@fullstory/babel-plugin-annotate-react', { native: true, ignoreComponents: ['React.Fragment'] }, ],

cansin commented 7 months ago

I am doing exactly what @shaunp-street suggested, but to no avail. Still getting Warning: Invalid propfsTagNamesupplied toReact.Fragment. React.Fragment can only havekeyandchildrenprops. warnings. Anybody with a solution?

RyanCommits commented 3 months ago

@cansin Could you share the source code for how you're using React.Fragment? If you have multiple uses of React.Fragment and not sure which one is causing this error, I suggest narrowing it down to a specific example.