Alex Aung
Alex Aung

Reputation: 3159

React-Native duplicate component name

I am using react-native with native-base theme. Now I want to use react-native-share package. But I need to use Button from both package but I got duplicate identifier error.

import Share, { ShareSheet, Button } from 'react-native-share';
import { Button } from 'native-base';

May I know how to declare another button from react-native-share?

Upvotes: 2

Views: 1354

Answers (1)

user5021676
user5021676

Reputation: 56

Please try use:

Import { Button as Btn } from 'native-base'

This should resolve your problem.

Upvotes: 4

Related Questions