Skip to content

Commit

Permalink
Fix incorrect imports
Browse files Browse the repository at this point in the history
  • Loading branch information
robmadole committed Apr 12, 2022
1 parent ea1ef8d commit b51f392
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ If you find that your build times are taking forever, check the way that you are
In past versions of `react-native-fontawesome` we've documented importing icons like this:

```javascript
import faStroopwafel from '@fortawesome/pro-solid-svg-icons'
import { faStroopwafel } from '@fortawesome/pro-solid-svg-icons'
```

This can cause build times for your project to skyrocket because React Native is trying to tree shake. The Font Awesome
Expand All @@ -439,7 +439,7 @@ packages are so large that we _highly_ recommend that you avoid this.
Instead, use "deep imports" by default.

```javascript
import faStroopwafel from '@fortawesome/pro-solid-svg-icons/faStroopwafel' // <- notice the additional module here?
import { faStroopwafel } from '@fortawesome/pro-solid-svg-icons/faStroopwafel' // <- notice the additional module here?
```

By directly importing from the `faStroopwafel.js` module there is no additional work that tree shaking needs to do in order to
Expand Down

0 comments on commit b51f392

Please sign in to comment.