-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to custom-rendered QR codes #220
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
266b1e7
to
cd23244
Compare
context = document.documentElement, | ||
) { | ||
// Create a temporary element | ||
const tempEl = document.createElement('div') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is expensive. You could reuse a hidden element here if you wanted to optimize more for performance. You could also cache the result in a map by size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The QRCode component is memoized, but yea makes sense to do this indidividual function as well. I'll wrap this in a useMemo
👍
Closes #212