react-native 导入不同的包,相同的组件名

错误:

import { Text } from 'react-native';

 import Svg, {Text } from 'react-native-svg';

正确:

import * as Svg from 'react-native-svg';

height="60"

width="200"

>

fill="none"

stroke="purple"

fontSize="20"

fontWeight="bold"

x="100"

y="20"

textAnchor="middle"

>react-native

你可能感兴趣的:(react-native)