The easiest way is to use the same condition as your disabled prop.(最简单的方法是使用与禁用道具相同的条件。)
Something like this should work :(这样的事情应该工作:)
style={!this.state.username || !this.state.password ? styles.disabled : styles.buttonWrapper}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…