question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove dependency on React Native's `TabBarIOS`

See original GitHub issue

react-native-web removed TabBarIOS in their recent 0.13.0 release, citing that it is a deprecated React Native API. Most UI libraries that support both native and web are using react-native-vector-icons and react-native-web to bring support to web. Unfortunately, react-native-vector-icons still has a dependency on TabBarIOS making it incompatible with the most recent versions of react-native-web. Is it possible to break this dependency in a future version, so we can all use the latest versions of react-native-web?

(There may be workarounds to this issue that I’m not aware of, but I couldn’t come up with any)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:13
  • Comments:5

github_iconTop GitHub Comments

10reactions
brandonpearcycommented, Jul 24, 2020

If you’re stuck on this issue, and just need a short-term workaround, you can depend on a fork of react-native-vector-icons that simply removes TabBarItemIOS and TabBarItem.

yarn add @ovaeasy/react-native-vector-icons

and then add it to your webpack config aliases:

    alias: {
      'react-native$': 'react-native-web',
      'react-native-vector-icons': '@ovaeasy/react-native-vector-icons',
    },
1reaction
arthurpankiewiczcommented, Oct 20, 2020

@brandonpearcy thanks for the workaround

For anyone using react-native-web and targeting both web/android, I ran into this error when compiling for android when using brandonpearcy’s forked repo

Program type already present: com.oblador.vectoricons.BuildConfig

the workaround was to add a react-native.config.js:

module.exports = {
    dependencies: {
        '@ovaeasy/react-native-vector-icons': {
            platforms: {
                ios: null,
                android: null
            }
        }
    }
};

Also TabBarIOSwas removed back in react-native@0.59 and probably shouldn’t exist in newer releases

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I down grade my react navigation in a current react ...
A simple way to do it would be to uninstall the current react-navigation dependencies you have by running npm uninstall react-navigation . That ......
Read more >
react-native-tab-view - npm
A cross-platform Tab View component for React Native. Implemented using react-native-pager-view on Android & iOS, and PanResponder on Web, ...
Read more >
Bottom Tabs Navigator | React Navigation
A simple tab bar on the bottom of the screen that lets you switch between different routes. Routes are lazily initialized -- their...
Read more >
How to Create a Custom Tab Bar in React Native - Crowdbotics
React Native is an amazing tool for creating beautiful, ... Then, for iOS, install the CocoaPods for all these dependencies by navigating ...
Read more >
3 Ways to Hide Navigation Bar in React Native Application
If you are making an application with a React Navigation StackNavigator, you can find a NavigationBar/ ActionBar on the top of the screen....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found