SolidJSS
SolidJSโ€ข2y agoโ€ข
9 replies
gsoutz

Untrack has no effect but signal doesn't fire anyway

Take a look at this way of events:

    createEffect(() => {
      console.log('fix fix', this.roundn[0]())
    })

    createEffect(() => {
      let n =untrack(() => this.roundn[0]())

      if (n) {
        console.log('ok test', n.flop[0].card)
      }
    })


    createEffect(() => {
      let n = this.roundn[0]()

      if (n) {
        console.log('not test', n.flop[0].card)
      }
    })



I trigger an event, and this is the console.log output:

not test 7h



I mean ok test doesn't happen because I untracked roundn() but roundn also doesn't happen because fix fix doesn't log.
Was this page helpful?