Replies: 1 comment
-
I do it in lot of my applications so I can confirm it works. You should probably log the content of Icons to see what's going on. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I created a directory of generated icons in my react native project using:
npx @svgr/cli --native assets/icons --out-dir assets/generated-icons
Instead of importing each of the generated svg's individually as components in my file, can I somehow import or reference the generated index.js instead, which contains the entire collection? I tried the following approach but it did not work:
import * as Icons from '../../../assets/generated-icons' and then referencing the icons with Icons.ChosenIconHere
Getting undefined errors using that approach. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions