Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

223
Views
drag and drop not working perfectly in React

if i want to execute that no error is happen but in console it gives error like Invariant failed: A Droppable requires a droppableId prop and provided.innerRef has not been provided with a HTMLElement ,how can I run that one

    import React, { useState } from "react";
        import {DragDropContext,Droppable,Draggable} from "react-beautiful-dnd"
        export default function DropDown() {
          const data=[
            {
              name:"Up",
              id: "1"
            },
            {
              name:"Down",
              id:"2"
            }
          ];
        const[list,setList]=useState(data);
        const onEnd=(result)=>{
         console.log(result); 
        }
          return (
            <>
            <DragDropContext onDragEnd={onEnd}>
              <Droppable droppableId="111">
                {(provided,snapshot)=>{
                  <div ref={provided.innerRef}>
                    {list.map((item,index)=>{
                      <Draggable draggableId={item.id} key={item.id} index={index}>
                        {(provided,snapshot)=>{
                          <div ref={provided.innerRef}
                          {...provided.draggableProps}
                          {...provided.dragHandleProps}
                          >
                                <div>{item.name}</div>
        
                          </div>
                        }}
        
                        </Draggable>
                    })}
              {provided.placeholder}
                  </div>
                }}
              </Droppable>
            </DragDropContext>
             
            </>
          );
        }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!