Skip to content

Incorrect Import Instructions in Documentation #2

@stokes1003

Description

@stokes1003

Description:
The package documentation instructs users to import it as a default import:

import CharacterRating from "react-char-fill";

However, attempting to use the package this way results in an error. The package only works when imported as a named import:

import { CharacterRating } from "react-char-fill";

Expected Behavior:
The package should either:

Support default imports as documented.
Update the documentation to reflect the correct named import usage.
Actual Behavior:
Default import does not work, leading to an import error. Only named import works.

Steps to Reproduce:

Install the package:
bash
Copy
Edit
npm install package-name
Import using the documented default import syntax.
Observe the import error.
Try a named import instead and see that it works.
Environment:

Node.js version: [your version]
Package version: [package version]
Module system: (CommonJS, ESM)
Additional Notes:
If the package is meant to be used with named imports, updating the documentation would prevent confusion. Otherwise, the export format might need to be adjusted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions