0

I am using React FontAwesome package to use FontAwesome icons in my React project. Something peculiar is happening, that is:

If I use a reference from the StyleSheet.create reference:

<FontAwesomeIcon
  ...
  style={styles.someStyle}
  ...
/>

that doesn't work. However, Object literals with the style (which is not a recommended practice in React) do work:

<FontAwesomeIcon
      ...
      style={{color:"red"}}
      ...
    />

what could I be doing wrong / having wrong in my setup?

Divyansh Goenka
  • 997
  • 2
  • 12
  • 35

0 Answers0