mastermoo / react-native-action-button

customizable multi-action-button component for react-native
MIT License
2.52k stars 570 forks source link

Cannot read property 'props' of null #366

Open nes123 opened 3 years ago

nes123 commented 3 years ago

I am getting the error in the following line of code:

TypeError node_modules/react-native-action-button/ActionButton.js:286

Any ideas what can go wrong?

naamhaiabdullah commented 2 years ago

Ok, same issue.

RobertDS07 commented 2 years ago

You can't have items rendering with condition:

//wrong

{callcenter_phone ? (
        <ActionButton.Item
          onPress={handleOpenCall}
          buttonColor={childrenColor || theme.colors.primary}
        >
          <Icon name="phone" type="FontAwesome" />
        </ActionButton.Item>
) : null}

I recommend creating an array with items that really exists