Skip to content

Import example in docs has incorrect node module path  #240

Open

Description

@mgwedd

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`

Activity

  1. mmehmetAliIzci commented on Jun 7, 2021

    @mmehmetAliIzci
    Contributor

    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

  2. Naturalclar commented on Jun 9, 2021

    @Naturalclar
    Member

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions