Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error switching when switching tabs #72

Open
shaibusunnuma opened this issue Apr 29, 2024 · 5 comments
Open

Error switching when switching tabs #72

shaibusunnuma opened this issue Apr 29, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@shaibusunnuma
Copy link

Current behaviour

I get the typescript error below when I switch tabs that have icons:
TypeError: this._icon.setNativeProps is not a function (it is undefined)

Expected behaviour

I didn't get this error until I upgraded to expo sdk 50

How to reproduce?

Set any icon in the Tab.
Eg. code

<TabsProvider defaultIndex={0}>
      <Tabs disableSwipe>
        <TabScreen label="Bookings" icon="book">
          <Bookings />
        </TabScreen>
        <TabScreen label="Subscriptions" icon="ticket">
          <Subscriptions />
        </TabScreen>
      </Tabs>
    </TabsProvider>

Preview

What have you tried so far?

Tried debugging and the error seems to come from the function createIconSet in @expo/vector-icons

Your Environment

software version
ios x
android 12
react-native 0.73.6
react-native-paper ^5.12.3
node 18.18.2
npm or yarn 1.22.19 (yarn)
expo sdk ^50.0.17
@shaibusunnuma shaibusunnuma added the bug Something isn't working label Apr 29, 2024
@iamMAHAM
Copy link

iamMAHAM commented May 3, 2024

I confirm this bug in expo@50. the error produced when you add the "icon" option to the TabScreen component.For now, I've commented on the icon option until I find the problem and fix it.

@AlejandroRM-DEV
Copy link

+1

3 similar comments
@Nicobas
Copy link

Nicobas commented Jul 4, 2024

+1

@ashwin9798
Copy link

+1

@sawankumar1012
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants