The styles do not get applied when arrays are passed to any component.
The style prop of react-native components does accept arrays.
Yes, that is a know issue right now. We're rewriting the CSS engine, so hopefully will figure out fix for it as well.
@sankhadeeproy007 Any estimate on when this would be potentially fixed? Are we talking days/weeks/months/years?
No estimate as of now. And it's not very high right now in our priority list.
@Anima-t3d You can try this way for array styling `style={{...styles.test, color: 'red'}}
use StyleSheet.flatten
https://facebook.github.io/react-native/docs/stylesheet.html#flatten
@rohozhnikoff
NOTE: Exercise caution as abusing this can tax you in terms of optimizations.
IDs enable optimizations through the bridge and memory in general.
Refering to style objects directly will deprive you of these optimizations.
Any update on this? I'd really love to use Styled components together with Native Base (see referenced issue)
@shivrajkumar Update? This has been open since Feb and even has a high priority label.. This really makes NativeBase a no-go for me.
@Neglexis I have fixed it here https://github.com/GeekyAnts/theme/commit/f3306215fdd6903dddf40bc5c1b2b71b55f9d62e
We will push a version bump of NativeBase next.
Sounds great, thanks for the update @sanketsahusoft !
This has been fixed with the latest version 2.3.0.
Now NativBase components accepts both Stylesheet.create and array styles.
Most helpful comment
Yes, that is a know issue right now. We're rewriting the CSS engine, so hopefully will figure out fix for it as well.