whyAmIRunning

See source code

A debugging tool that tells you why a computed signal or effect is running. Call in the body of a computed signal or effect function.

function whyAmIRunning(): void

Example

const name = atom('name', 'Bob')
react('greeting', () => {
  whyAmIRunning()
  print('Hello', name.get())
})

name.set('Alice')

// 'greeting' is running because:
//     'name' changed => 'Alice'
Prev
unsafe__withoutCapture
Next
withDiff

We use cookies on this website.
Learn more in our Cookie Policy.