1.0.10 • Published 2 months ago

use-beautiful-dnd v1.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

Use Beautiful DND

Like react-beautiful-dnd, without the ugly code (ehem render props).

Usage

Same as react-beautiful-dnd, except we handle the render props for you

import { DragDropContext } from 'react-beautiful-dnd'
import { Droppable, Draggable, useDraggableContext } from 'use-beautiful-dnd'

function Demo() {
  return (
    <DragDropContext onDragEnd={onDragEnd}>
      <Droppable droppableId='...'>
        <Draggable key='...' draggableId='...' index={0}>
          <Component />
        </Draggable>
      </Droppable>
    </DragDropContext>
  )
}

function Component() {
  const { snapshot, rubric } = useDraggableContext()

  // ...
}
1.0.10

2 months ago

1.0.9

2 months ago

1.0.8

2 months ago

1.0.7

2 months ago

1.0.6

2 months ago

1.0.5

2 months ago

1.0.4

2 months ago

1.0.3

2 months ago

1.0.2

2 months ago

1.0.1

2 months ago

1.0.0

3 months ago