Use bit flag instead of booleans in TestDrawableComponent
See original GitHub issueWe have a lot of booleans to configure the test components like callsShouldUpdateOnMount
or implementsAccessibility
. Instead of keeping the configuration flags as booleans we could have them as bit flags.
Code pointers
Point of contact: @mihaelao
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Why use flags+bitmasks rather than a series of booleans?
It was traditionally a way of reducing memory usage. So, yes, its quite obsolete in C# :-) As a programming technique, it may...
Read more >O.1 — Bit flags and bit manipulation via std::bitset - Learn C++
When individual bits of an object are used as Boolean values, the bits are called bit flags. As an aside… In computing, a...
Read more >Fast Bit Flag Boolean Expressions - Topten Software
An algorithm for converting boolean bit flag expressions to fast bit mask and test operations and even faster execution via dynamic IL method ......
Read more >Bitmasks: A very esoteric (and impractical) way of managing ...
Using a bitmask means to query the bits found in some binary number. ... Let's say we have an object that stores booleans...
Read more >Bitwise booleans in PHP - Stitcher.io
To represent these boundaries, I stored two boolean flags on the enum ... Instead of using a whole byte, we only need one...
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
Hey @emilsjolander, I want to take up this issue. Can you guide me? Do we need to use bit flags just like it is used in InternalNode.java file?
https://github.com/facebook/litho/blob/master/litho-core/src/main/java/com/facebook/litho/InternalNode.java
Resolved with https://github.com/facebook/litho/issues/138