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

125
Views
How to refactor and simplify a Drag-And-Drop code into smaller chunks

I created a prototype drag & drop functional component using react-beautiful-dnd. However, I am not so happy with the length of the code (like 250) lines and I think it should be better breakable.

Please find this example under this sandbox. I would like to hear your re-factoring advice how I can split the "right column" into a separate functional component, what kind of props and events need to be carried and how ??

Thanks in advance. Geo

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

OK, I will answer my own question for the sake of completeness and backward-reference :)

I was actually thinking that it would be needed to provide any DrapDropContext parameters in the split functional components: NOT NECESSARY.

The main point is to be able to carry the data object and integrity between these "outsourced components" and using a context was the solution for that. DrapDropContext was simply taking care of any behavioural details on the events.

Thanks for reading anyways. Geo

about 4 years ago · Juan Pablo Isaza Report
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!