NativeBase: Fab button bug in production

react-native, react and native-base version

react-native: 0.42 react: 15.4.2 native-base: 2.0.13

Expected behaviour

Show ‘Button’ component only

Actual behaviour

In iOS, It shows empty button in production(release mode)

glass

Steps to reproduce (code snippet or screenshot)

Screenshot of emulator/device

Is the bug present in both ios and android or in any one of them?

iOS (Not tested Android yet)

Any other additional info which would help us debug the issue quicker.

In this code, if app is in release mode, component’s displayName is not Styled(Icon) or Styled(IconNB). It looks like Styled(o), Styled(d). So childrenArray includes Icon component. I think it’s related with minification of source code.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 19 (3 by maintainers)

Commits related to this issue

Most upvoted comments

@charles-mutabazi

Not yet. I’m just workarounding for my project.

I changed the Fab.js file in ‘node_modules/native-base/dist/src/basic’ path.

  1. Comment out line 202 - 206
  2. At line 210, return a sliced childrenArray. (It’s not good because it is dependant on component order) Change array method to childrenArray.map -> childrenArray.slice(1).map

We are looking into this

No, It will be released by end of this week or next week.

Fixed with 2.1.5