Title is not updated
steffenkleinle opened this issue · 2 comments
steffenkleinle commented
Describe the bug
Thanks for your work on this library! ❤️
If title passed to the SVG component changes (because of a prop or state change), it is not updated. Instead, the old title keeps being rendered.
Your minimal, reproducible example
https://codesandbox.io/s/frosty-breeze-w7kwhm
Steps to reproduce
- Got to the sandbox
- Have a look at the title of the two svgs (
Old title
) - Click on the button
Click me!
- Have a look at the title of the two svgs (still
Old title
)
Expected behavior
If the title passed to the SVG component changes, it should be updated accordingly.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
No response
react-inlinesvg version
4.0.4
TypeScript version
5.2.2
Build tool
No response
Additional context
No response
gilbarbara commented
Hey @steffenkleinle
Thanks! 🎉
Fixed in 4.0.5
steffenkleinle commented
Thanks @gilbarbara, that was by far the fastest fix and release I have seen so far! Amazing 😍
Also tested this and works like a charm!