[state] Does not allow declarative comparisons of numerical state values
See original GitHub issueHi, Kevin.
I’m currently using/testing in the latest 4.7.0
version, and it appears that it is not possible to make declarative comparisons against numerical state values.
Example:
<a-entity ... bind__visible="level === 4"></a-entity>
If the state value is stored a string ("4"
), then it works, but that requires manually parsing to and from string/number if it’s necessary to manipulate the number.
I wasn’t sure if this was by design, so I just thought I’d mention it.
I’m not sure if it would be possible to also add the ability to make <, >, <=, >=, <==, >== comparisons declaratively, but would be a cool feature. Let me know if that’s something I should open an enhancement request for.
Thanks for a great component.
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Amazon States Language
Amazon States Language. This document describes a JSON-based language used to describe state machines declaratively. The state machines thus defined may be ...
Read more >Sync Options - Argo CD - Declarative GitOps CD for Kubernetes
Argo CD allows users to customize some aspects of how it syncs the desired state in the target cluster. Some Sync Options can...
Read more >Declarative SQL: Using CHECK() & DEFAULT - Simple Talk
SQL is unusual is that data is not passively stored. ... as minimums and/or maximums for numeric values or allowed values for a...
Read more >Difference between declarative and imperative in React.js?
A declarative style, like what react has, allows you to control flow and state in your application by saying "It should look like...
Read more >Content filtering in Amazon EventBridge event patterns
Amazon EventBridge supports declarative content filtering using event patterns. With content filtering, you can write complex event patterns that only match ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s not that it’s recommended over aframe-react persay, it’s that React and friends are very poor tools for VR and I’ve seen it cause more distraction and trouble than help.
Can create a component that takes the points and threshold and handles appropriately.
Pretty much that code will get
eval
ed, so yeah.