ButtonGroup fails on iOS Expo Dev Client

Open
#3,869 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
react-native, typescript
Domain
mobile-dev

Research direction

Start in packages/base/src/ButtonGroup/ButtonGroup.tsx at the referenced lines around 204-207, then reproduce the error with the provided Expo 49 and React Native 0.72.6 setup in an iOS Expo Dev Client. Done means ButtonGroup loads and works as expected without the reported TypeError.

Written by the indexing model from the issue text.

Description

Needs Triage
Is there an existing issue for this?
  • I have searched the existing issues
Explain what you did

Use ButtonGroup in an iOS Expo Dev Client

Expected behavior

Works as expected

Describe the bug

Got this error

TypeError: (0, _color.default)(underlayColor).alpha(activeOpacity).rgb is not a function (it is undefined)

Appears to be used here

https://github.com/react-native-elements/react-native-elements/blob/72a4ac51ac60e305c1ef8fab4f81fdc7f0b7c9dd/packages/base/src/ButtonGroup/ButtonGroup.tsx#L204C6-L207C19

This is not "blocked" by a platform check

Steps To Reproduce
1. Create a custom dev client for Expo with the peer deps of RNEUI
2. Create a button group

        <ButtonGroup
          buttons={["English", "French", "Japanese", "System"]}
          onPress={async (nextLanguageIndex) => {
            const langs = ["en", "ja", "fr", null];
            await setLanguageAsync(langs[nextLanguageIndex]);
          }}
          // selectedIndex={isSystemLanguage ? 3 : ["en", "ja", "fr"].findIndex(it => it === language)}
        />
  1. try to load up the app in DevClient


### Screenshots

_No response_

### Your Environment

React Native Elements Env Info

## Global Dependencies:

   No related dependency found

## Local Dependencies:

 - @rneui/base : ^4.0.0-rc.8
 - @rneui/themed : ^4.0.0-rc.8
 - expo : 49
 - react : 18.2.0
 - react-native : 0.72.6
 - @types/react : ~18.2.14
Dominant language
MDX
Stars
25.9k
Forks
4.7k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from react-native-elements/react-native-elements

All issues in react-native-elements/react-native-elements

Similar issues

More Mobile Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.