0
我有以下幾點:在React中,如何在變量中使用變量?
<MenuItem
primaryText={currentUserProfile.displayName || currentUserProfile.email}
onTouchTap={this.handleTouchTap}
leftIcon={<DropDownArrow color={textColor}/>}
rightIcon={<img src="{currentUserProfile.displayName}" alt="Me" />}
style={{color: textColor}}
/>
的rightIcon不工作,因爲它已經是內{} ---我怎麼得到一個變量中的{}工作?
感謝
是做正確的方式還是黑客?只是想正確學習... – AnApprentice
謝謝安德魯,想發佈答案,所以我可以接受? – AnApprentice
等一下,我認爲我沒有正確地閱讀這個問題。你是說src變量不起作用嗎? – Li357