0

Is this the right way?

const styles = {
  text : props => ({
    color :  props.color,
    })
  }

By following this, the color is being applied to the text. But on refreshing, the color which was passed through props vanishes and the default black color gets applied on the text.

0 Answers0