Let's say in my component I set the state like so:
this.setState({
test: "value",
othertest: "value"
});
If, elsewhere in my code, I have an array containing the keys for these values, ie- keys = ["test", "othertest"]
how can I loop through this array to find the value of the corresponding state value?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…