Title is not updated
steffenkleinle opened this issue · comments
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
Hey @steffenkleinle
Thanks! 🎉
Fixed in 4.0.5
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!