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
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.
I want to know previous value after callng "set"
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•2y ago
Message Not Public
Sign In & Join Server To View