Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for this coool plugin. This is something I didn't know I needed. 😆 🙏
I am not sure whether this should be merged but opening a PR here to add support for React native web in case someone finds it useful and can just copy-paste. I am adding some steps to make it work in React Native web.
Pass a plugin option {reactNativeWeb: true} to make it work.
// babel.config.js
More details
React native web 0.13+ doesn't support data-attr syntax. Data attributes can be set using dataSet prop on components.
To set data-source, one needs to pass dataSet={{source: value}} as a prop.
More info here. https://necolas.github.io/react-native-web/docs/view/#props
Note
Needs react-native-web 0.14 or greater.