You're getting the double render because you're rerendering on the update of the searchValue in one useEffect, and updating the navigation prop in the next.(之所以得到双重渲染,是因为您要在一个useEffect中更新searchValue的值,然后在下一个useUffect中进行更新。)
Try coupling those changes in one useEffect,(尝试将这些更改结合在一起使用,)
useEffect(() => {
setSearchValue(textValue);
props.navigation.setParams({ searchValues: textValue });
}, [textValue]);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…