eslint-plugin-react-native
eslint-plugin-react-native copied to clipboard
no-unused-styles does not support React Fragment shorthand
As per title, when using <></>, eslint does not report any errors.
However, <React.Fragment></React.Fragment> does work
import React from 'react';
import { View, StyleSheet } from 'react-native';
export default function Tester() {
return (
<>
<View style={styles.used} />
</>
);
}
const styles = StyleSheet.create({
unused: {},
used: {},
});