Skip to content

arrayMoveImmutable is not defined, use top level import arrayMove #49

Open
@mark1yan0

Description

@mark1yan0

Describe the bug
This is not a bug per se, rather a (what I think is) error in the documentation.
In the basic usage in the documentation, the function arrayMoveImmutable is imported with object destructuring.

import { arrayMoveImmutable } from 'array-move' 

However, when trying to use it, the following error occurs. It seems that the array-move only exports one function now

TypeError: arrayMoveImmutable is not a function

I think this is an error in the documentation, because in the example with the knob the following is working fine

import arrayMove from 'array-move' 

To Reproduce
Steps to reproduce the behavior:

  1. Follow basic usage
  2. Try to sort the list
  3. See error

Expected behavior
Correct example in the documentation

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