静的なデフォルトのスタイルシートスタイルで動的なインラインスタイルを与える必要があります。どうすれば実現できますかデフォルトのスタイルシートを使用した動的インスタイルネイティブ
<View
style={[styles.card,{{width:width, height: height}}]}>
<View style={styles.card}>
<Text>
<Image
source={{uri: this.props.media.image_url}}
style={{width:width, height: this.props.media.height}}/>
</Text>
</View>
</View>
上記のコードは私にとっては機能しません。
サーバーレンダリングの場合は、サーバーレンダリングでスタイルローダーがサポートされていないため、将来変更する必要がある可能性があります。 – abhirathore2006
サーバーレンダリングの解決策は何ですか? –
https://github.com/webpack/extract-text-webpack-pluginを使用すると、すべてのCSSが1つのファイルにまとめられます。 – abhirathore2006