How to get previous value in createSignal's getter?

I have a signal like this. const [ get, set ] = createSignal (0) I know I can get previous value in setter. But is there way to get previous value in get ?
4 Replies
fabiospampinato
Unless we are talking about concurrent mode, where there might be some difference, the value that the setter is giving you is the current vale, the new value hasn't been set yet, so if you want the current value you'll just have to call the getter.
musiclover
musiclover2y ago
I want to know previous value after callng "set"
fabiospampinato
Can you show some code of what you'd like to do? "previous" values don't exist, there's only the current value
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server