react-native-segmented-control / segmented-control

React Native SegmentedControl library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Import example in docs has incorrect node module path

mgwedd opened this issue · comments

The README instructions suggest importing the module as follows:

import SegmentedControl from '@react-native-segmented-control/segmented-control';

However, the package is installed under @react-native-community/segmented-control, not @react-native-segmented-control/segmented-control

Suggested change:
import SegmentedControl from '@react-native-segmented-control/segmented-control';
Should be changed to:
import SegmentedControl from '@react-native-community/segmented-control';

Using React Native v0.63.3, Node JS v12.19.0and NPMv7.7.6`

Hi @mgwedd
I believe the problem resides in the following:

There is two packages published in npm.
image

"@react-native-community/segmented-control",
"@react-native-segmented-control/segmented-control"

Both of them points to the same repository. Hence the problem with the Readme. I would love to help about this if you need this @Naturalclar. But I believe this is a credential sensitive topic. Is there a reason why we have 2 separate npm entries for this package ?

I also see that this one is version wise ahead from the "@react-native-community/segmented-control" community one. I would expect these kind of misalignments.

Mehmet

Hello! Sorry for the confusion.
We're in the middle of migrating packages out of the @react-native-community namespace, hence the multiple name space for this repo.
More details can be found here
react-native-community/discussions-and-proposals#330

Please migrate to the new namespace whenever possible, as the old namespace wont be maintained from here on