트윗을 표시하는 RN 구성 요소를 작성하려고합니다. 훌륭한 RN 구성 요소 인 react-native-fabric-twitterkit을 포크하고 트윗을 표시하는 구성 요소를 추가했습니다. 지금까지는 그렇게 좋았지 만, ScrollView 안에서 그 트윗을 표시하고 싶을 때, 구성 요소의 높이와 너비를 지정해야만 그렇지 않으면 표시되지 않습니다. 어떤 생각인지 내가 뭘 잘못 했니?React 네이티브 사용자 지정 구성 요소가 구성 요소의 크기를 동적으로 설정하지 않습니다.
은 여기 내 포크 RN 구성 요소입니다 : https://github.com/adamivancza/react-native-fabric-twitterkit
그리고 여기 내 문제를 전시 테스트 응용 프로그램입니다 : https://github.com/adamivancza/react-native-twitterkit-test
<View style={styles.container}>
<ScrollView
style={{ flex: 1 }}>
// this component is displayed because I've set a specific height
<Tweet
style={{ flex: 1, height: 200 }}
tweetId='788105828461006848'/>
// this component is not displayed
<Tweet
style={{ flex: 1 }}
tweetId='788105828461006848'/>
</ScrollView>
</View>
'height'와'width'을'null'로 설정하려고 했습니까? 예를 들어 버그가 있습니다. – jonzee
의 이미지 @ jonzee 슬프게도 도움이되지 않았다 – Roosevelt
같은 문제가있었습니다. 반응 네이티브와 같은 모양은보기의 크기를 조정하는 데 문제가 있습니다. https://github.com/facebook/react-native/issues/4990 및 https://github.com/facebook/react-native/issues/9275에서 문제에 대해 논의합니다. – smilledge