我想在react-native中创建具有线性渐变颜色的文本,但找不到合适的方法或包来做到这一点。我尝试使用这个包:。但是,在尝试使用expo运行示例时,它给出了以下错误:
TypeError: Cannot read property 'x' of undefined
This error is located at:
in RNLinearTextGradient (at App.js:26)
in RCTView (at View.js:60)
in View (at App.js:17)
in App (at registerRootComponent.js:35)
i
我有一个十六进制的颜色,这是通过道具在这个文件,十六进制代码是‘# The 2625’。在其中正确显示,但当我将同样的颜色应用于backgroundColor时,颜色将不显示,而是抛出一个警告。
警告:失败的道具类型:无效的道具‘背景颜色’提供给视图:‘# are 2625’有效的颜色格式是.
import React from 'react';
import {StyleSheet, View, Text} from 'react-native'
export default class Color extends React.Componen