我正在使用react-native-svg和react-native-svg-transformer以便在我的react-native-app中渲染SVG。是否可以访问导入的SVG组件的子级?理想情况下,我想向所有孩子添加onPress事件。还是我不应该使用变形器来构建自己的添加onPress事件的转换器?
import TestSVG from './test.svg';
const TestComponent = () => (
<View>
<TestSVG
width={'100'}
height={'100'}
//add a way to add separate onPress events of the children of <TestSvg/>
/>
</View>)