Nativebase: 'style' prop does not accept arrays.

Created on 26 Feb 2017  路  11Comments  路  Source: GeekyAnts/NativeBase

The styles do not get applied when arrays are passed to any component.

The style prop of react-native components does accept arrays.

bug

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.

All 11 comments

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'}}

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chetnadaffodil picture chetnadaffodil  路  3Comments

inv2004 picture inv2004  路  3Comments

eggybot picture eggybot  路  3Comments

bsiddiqui picture bsiddiqui  路  3Comments

georgemickael-b picture georgemickael-b  路  3Comments