##Delightful Drag and Drop for complex interactive UIs
Drag and Drop is undoubtedly one of the most popular and user-friendly interactions in software nowadays. There are plenty awesome libraries for DnD in React realm, covering most of the use cases. We tried them all at productboard, but realized we need something special for complex interfaces we are building. We developed our own solution that satisfied three main requirements we had:
- This code handles any JS runtime error during rendering React components. Without this handling, once an error occurs, whole component tree is damaged and can't be used at all. With this handling, nothing will be rendered in production environment (error span in dev env.) + in production the error is logged to Sentry (if you are not using it just delete related code)
- This is basicaly a workaround for proposed feature in React core - described in Issue: https://github.com/facebook/react/issues/2461
- Works for all variants of Component creation - `React.createClass`, extending `React.Component` and also stateless functional components.
- To get this work, just put this snippet into your entry js file. Then it will work in whole application.
Usable mainly when reducer is more like _assembler_ for your data store changes, and main logic is put into action. So you often need to dispatch multiple smaller action, but to keep it atomic, they have to be processed in a single reduce step. This is the solution. The bonus is, it works well with devTools also.