gilbarbara / react-inlinesvg

An SVG loader component for ReactJS

Home Page:https://codesandbox.io/s/github/gilbarbara/react-inlinesvg/tree/main/demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. Got to the sandbox
  2. Have a look at the title of the two svgs (Old title)
  3. Click on the button Click me!
  4. 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!