solid: createEffect works, but attribute expression reactivity with same variable is not being triggered

Seems like I’m experiencing the same issue described in https://github.com/adamhaile/surplus/issues/27, but with Solid.

I have an expression like this:

<line strokeWidth={(console.log('re-run strokeWidth attribute'), this.width)} />

But the console.log only fires once, initially, and isn’t updating on changes to the underlying reactive variable.

  • this.width is a getter that calls this.ratio.
  • this.ratio is a getter that calls this.animationAmount.
  • and finally, this.animationAmount is a getter that reads from a reactive signal made with createSignal.

Seems like the problem is only in the attribute. Because if I run something like

    createEffect(() => {
      console.log('anim: ', this.width)
    })

then I see the logs during my animation. It is only the attribute that isn’t being updated.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

https://github.com/webpack/webpack/issues/985

This comment has the solution! https://github.com/webpack/webpack/issues/985#issuecomment-260230782

Everything is working great now.

WOOOO HOOOOOO!!

I believe I’ve fixed the SVG issues with Babel Plugin JSX DOM Expressions v0.13.2. Unfortunately, my codesandboxes don’t seem to want to update. But I’m hoping if you try again this will be resolved.