Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

ERROR:2339 the property 'setNativeProps' does not exist type 'never'

$
0
0

whenever i use 'setNativeProps' in my code it won't work for some reason and its not just one code.It always show the error 2339 and im using typescriptI'm using react.js with expo on a donut chartHERES THE CODE, PLZ HELP

    React.useEffect(() =>{        const maxPerc=100 * percentage/max;        const strokeDashoffset= circleCircumference - (circleCircumference *maxPerc) /100;        animatedValue.addListener(v =>{            if(circleRef?.current){                circleRef.current.setNativeProps({                    strokeDashoffset,                });            }        })    })    return (<View><Svg width={radius * 2}height={radius * 2} viewBox={`0 0 ${halfCircle * 2} ${halfCircle * 2}`}><G rotation='-90 ' origin={`${halfCircle}, ${halfCircle}`}><Circle                   cx='50%'                   cy='50%'                   stroke={color}                   strokeWidth={strokeWidth}                   r={radius}                   fill="transparent"                   strokeOpacity={0.2}                  /><AnimatedCircle                   ref={circleRef}                   cx='50%'                   cy='50%'                   stroke={color}                   strokeWidth={strokeWidth}                   r={radius}                   fill="transparent"                   strokeDasharray={circleCircumference}                   strokeDashoffset={strokeDashoffset}                   strokeLinecap='round'                   /></G></Svg></View>    );}

Viewing all articles
Browse latest Browse all 6287

Trending Articles