Skip to content

Dynamically create avatar based style argument #409

Answered by FlorianKoerner
pandabytes asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @pandabytes

Your example is the best way to achieve the functionality. 👍

The ability to specify an avatar style via a string would mean that all avatar styles would have to be shipped with the library. Typically, not all avatar styles are used, so in a browser environment you would have to transfer an unnecessarily large amount of data. This is the reason why we separate library and avatar styles - it allows tree shaking.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pandabytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants