Closed van-fs closed 2 weeks ago
It depends on where you look or what it is actually referring to. In order to get React Native to compile, internally the attributes actually are camel case. However, that is later changed to kebab-case when it hits our backend (I forget where).
Ah, here it is: https://github.com/fullstorydev/fullstory-react-native/blob/master/android/src/main/java/com/fullstory/reactnative/FullStoryNativeProps.java
This is for Android, but you can see we add the kebabe-case as the actual attribute name when it gets set.
I don't mind it being changed, but we should at least be clear that, for the babel plugin, it adds them as camelCase and then changed back to kebab-case when set so that you see them as kebab-case (just like for React web) in FSTA.
@JoshMiers-FS Perhaps we append the text in bold to the paragraph. WDYT?
For React on the web the attributes are data-component
, data-element
, and data-source-file
. For React Native the attributes are dataComponent
, dataElement
, and dataSourceFile
. Note that for both React web and Native, these attributes will appear as kebab-case in the Fullstory application due to backend processing. End users of Fullstory should create search filters (i.e. segments, metrics, etc) using kebab-case.
That sounds good to me.
Describe the bug The readme states, "For React on the web the attributes are data-component, data-element, and data-source-file. For React Native the attributes are dataComponent, dataElement, and dataSourceFile."
To Reproduce N/A
Expected behavior From looking at selectors in a native mobile org,
data-
attribute selectors definitely index for Mobile Apps platform dependent criteria. I'm not seeing any fordataComponent
though. Kevin and Prashanth both said that's a doc bug FWIW. Can we remove the incorrect distinction between web and mobile? My understanding is that itsdata-*
regardless of platform but could use someone more knowledge to clarify.Actual behavior N/A
Node env (please complete the following information): N/A
Additional comments
Logs N/A