Replies: 1 comment
-
The second argument to Evaluatelater. Oh your title isn't asking the same thing as the post You can just do What I think you want is just for the user to pass the key to the thing to modify, like how x-model works. So they could do, in your example And you take that and make a setter method like just const evaluateGet = evaluateLater(expression)
const getIdle = () => {
let result;
evaluateGet(val => result = val)
return result
}
const evaluateSet = evaluateLater(`${expression} = $idle`)
const setIdle = (val) => evaluateSet(()=>{}, { $idle: value }) Then just call that setTimeout(() => setIdle(true), 1000) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've a custom directive named
idle
. My directive is callingevaluate()
when user is either idle or active (interacting with the page).The problem is that, right now, I'm using the a "trick" to negate ther expression of
x-idle
:It would be good to pass the current state (idle or active) to the evauator. Or, put it in other words, how a directive can interact with the data, or what's the best solution in this case?
Beta Was this translation helpful? Give feedback.
All reactions