v2.1.4

@gaearon gaearon released this Apr 2, 2016 · 29 commits to master since this release

  • Allow React 15 as peer dependency (#423)

Downloads

v2.1.3

@gaearon gaearon released this Mar 13, 2016 · 36 commits to master since this release

  • Remove the developer warning when default export is accessed (#408, #409)

Downloads

v2.1.2

@gaearon gaearon released this Feb 19, 2016 · 43 commits to master since this release

  • Removes accidental console.log() in UMD builds (#385)

Downloads

v2.1.1

@gaearon gaearon released this Feb 17, 2016 · 45 commits to master since this release

  • Attempts to fix a memory leak when rendering on the server (#379, #337)
  • Contains optimizations that prevent unnecessary ref reattachement in common cases (d023c63)

Downloads

v2.1.0

@gaearon gaearon released this Feb 14, 2016 · 50 commits to master since this release

Downloads

v2.0.2

@gaearon gaearon released this Oct 20, 2015

  • Fixes #261 hopefully for good—the change in 2.0.1 wasn't covering all cases

Downloads

v2.0.1

@gaearon gaearon released this Oct 20, 2015

  • Don't throw on undefined options when nodes are equal. Fixes #261

Downloads

v2.0.0

@gaearon gaearon released this Oct 14, 2015

Breaking Changes

React 0.14 is now required

This release removes the warnings for React 0.14, but it now requires 0.14 too.

The UMD build is gone from master

The UMD build is no longer available in dist folder in master branch. Instead, it is available in dist folder on the latest branch and any future tagged release branch.

HTML5 backend and test backend are now in separate packages

We are using this opportunity to separate the backends out of React DnD repo and package.

You will need to install react-dnd-html5-backend in addition to react-dnd. You may also install react-dnd-test-backend.

Similarly, in UMD builds, ReactDnD no longer includes ReactDnD.HTML5. You need to use ReactDnDHTML5Backend provided separately in the dist folder of the latest or any tagged release branch in the react-dnd-html5-backend repo.

Official Bower support is gone

I no longer intend to support Bower. Please stop using Bower. NPM 3 works very well for front-end development, and you should use it instead.

Because the UMD builds are available on latest and tagged release branches of both React DnD and its HTML5 backend in the dist folder, you can point your configs to them instead.

connect*() methods no longer accept composite component elements

This worked and still works:

return connectDragSource(<div><Something /></div>);
return connectDragPreview(<div><Something /></div>);
return connectDropTarget(<div><Something /></div>);

However, this worked in 1.x, but will throw in 2.x:

return connectDragSource(<Something />);
return connectDragPreview(<Something />);
return connectDropTarget(<Something />);

This change was made to avoid dependency on react-dom for React DnD, which is a good thing for React libraries. It also enforces stronger encapsulation because the connect*() is now always located in the view that actually creates the related React DOM element. Relevant commit: 96d4c30.

The solution is to make sure that, when you pass a React element to connectDragSource, connectDragPreview, or connectDropTarget, it is always a React DOM element, and not an element for a custom component.

You have three ways of ensuring this, in the order of preference:

Change your connect*() calls to wrap custom components in <div>s

Before
return connectDragSource(
  <Something />
);
After
return connectDragSource(
  <div>
    <Something />
  </div>
);

Make those components drag sources or drop targets themselves

Before
return connectDragSource(
  <Something />
);
After
return <Something />; // assuming Something is a DragSource now

Call findDOMNode() yourself and put connect*() methods directly on the ref

This is especially useful if you used connect*() methods inside higher order components:

Before
return connectDragSource(
  <Something />
);
After
return <Something ref={instance => connectDragSource(findDOMNode(instance))} />;

Downloads

v1.1.8

@gaearon gaearon released this Sep 17, 2015 · 102 commits to master since this release

  • Fixes Firefox navigating to dropped text, link or image: #221, #219, #242, #259
  • Fixes Ctrl+A not working inside drag sources: #178, #266

Downloads

v1.1.7

@gaearon gaearon released this Sep 15, 2015 · 109 commits to master since this release

  • Should fix #277 by bumping dnd-core@1.2.1 and performing resubscription in correct order (#278)

Downloads