I have created a custom wrapper for text in RN and when I trying to import, It getting this error View config getter callback for component 'RCTText' must be a function (received 'undefined'). here is my code. I have tried to import View instead of Text and its working. Can't find the exact issue here. (for full code check image)
import React from 'react'
import PropTypes from 'prop-types'
import { Text as RNText } from 'react-native'
//...other imports
const Text = (props) => {
const {
children,
textProps,
testIds,
} = props
return (
<RNText
{...testProps(testIds.textTestId)}
{...textStyleProps(props)}
allowFontScaling={false}
maxFontSizeMultiplier={0}
{...textProps}
>
{children}
</RNText>
)
}
Any solutions?