Open 0xcharchar opened 3 years ago
Hi, Thanks for the feedback. Great idea about a mechanism for knowing which networks are available. I added TypeScript types to the component definition in this commit which should give network autocompletion in your editor.
Just trying to understand your use. Do you have external code potentially requesting a network which does not exist? Are you using TypeScript? I'm exporting a Network type now, wonder if that helps?
For my use case, the network names come from an external list so I don't have control over the data.
Is your feature request related to a problem? Please describe.
I am including social icons as part of another component in my project but running into two things that would be nice to have officially added:
Describe the solution you'd like
Official functions to get details is probably my preferred access:
Describe alternatives you've considered
Exporting a simple object would also work and make adding new features easier (imho):
Additional context
Here is how I am currently accessing that data, my biggest concern being that the _network-db.js file moves or changes drastically to suit the project better.
Happy to provide a PR if this is a feature you're interested in and don't have time to work on.