x64Bits / solid-icons

The simplest way to use icons in SolidJS
https://solid-icons.vercel.app
MIT License
284 stars 18 forks source link

class prop d #5

Closed pinko64 closed 2 years ago

pinko64 commented 2 years ago

Props doesn't react to solidjs signals.

For example the next won't work:

<VscHome size={64} class={pathname() != "/home" ? cssIcon : cssIconSelected} onClick={() => { navigate("/home"); }} />
As in <div class={pathname() != "/home" ? cssIcon : cssIconSelected}></div> does react to signals.

x64Bits commented 2 years ago

Hello @pinko64, I hope you are well and healthy, i am going to review this as soon as possible because i am dividing the props it receives due to the reactivity gain.

pinko64 commented 2 years ago

Thank you.

x64Bits commented 2 years ago

Hello again @pinko64, there is a problem in the way you are passing the props through the individual icons using destructuring method, this makes you lose reactivity in the process, it was fixed, i would like you to try version 0.4.11 and tell me if it works please, happy week!

x64Bits commented 2 years ago

I would like to especially thank you for reporting this problem because it was very important to solve this, I was able to remove a solid-js dependency that was not having the effect that I thought, also I plan to introduce it so that users who visit Icons Explorer can change colors and sizes dynamically and it will be necessary.

pinko64 commented 2 years ago

Seems to be working now. Thanks for putting the effort!