How to compare key value with object in riot? am trying to compare key value with object in riot pleae suggest
Asked
Active
Viewed 37 times
1 Answers
0
First of all you should be more explicit in your question... What key and value do you want to compare with object? Why do you need riot to do that?
Anyway, you can use lodash API for comparing objects efficiently. If you really need riot you can use if conditional on the HTML element and use a function or inline comparison.
E.g.
<div if={ active: key === object }></div>
You should be more explicit if want appropriate answers

S. Esteves
- 415
- 4
- 14