NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4599 most downloaded on npm
invariantx
Last release 4 years ago
no release in 18 months
Ships unpredictably
gaps range from 3 weeks to 2.2 years
Most releases are documented
notes for 5 of 8 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
8 releases · first in 2019
Nothing published for this version
'react' was a dependency instead of a devDependency.
'react' was a dependency instead of a devDependency.
React 17 prep - remove usage of lifecycle methods that are being deprecated
Breaking Changes:
Other Changes:
require()s with imports, which was causing grief for some users. This resulted in some culling of dependencies.decorateHandler. This check was not working correctly in certain situations, and resulted in silent failures. By just setting the ref directly, React will emit warnings about not being able to ref SFCs, which is more useful.One column per quarter.
3.0.0 was intended as a prerelease version (apologies for not including a -beta tag). This is the "final" 3.0 release.
3.0.0 was intended as a prerelease version (apologies for not including a -beta tag). This is the "final" 3.0 release.
The typings here have been updated to align more closely with the DefinitelyTyped react-dnd typings. They are much more accurate than in the prerelease.
Edit: please don't use this version, we discovered a critical issue with the documentation site.
In this release we've migrated the codebase to Typescript. The published libraries now have their own embedded typings definitions. It will remain an
In this release we've migrated the codebase to Typescript. The published libraries now have their own embedded typings definitions. It will remain an ongoing effort to improve the typings in our code.
Breaking Changes:
window from react-dnd. This should allow us to experiment with using react-dnd react-native. To support this, the DragDropContextProvider has been totally changed up. It now accepts a context object parameter that is backend-implementation dependent. Currently the HTML5Backend will need context to be { window }This release removes the warnings for React 0.14, but it now requires 0.14 too.
This release removes the warnings for React 0.14, but it now requires 0.14 too.
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.
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.
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 elementsThis 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: https://github.com/gaearon/react-dnd/commit/96d4c309089274839503ff95e4f8bfc979c364b7.
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:
connect*() calls to wrap custom components in <div>sreturn connectDragSource(
<Something />
);
return connectDragSource(
<div>
<Something />
</div>
);
return connectDragSource(
<Something />
);
return <Something />; // assuming Something is a DragSource now
findDOMNode() yourself and put connect*() methods directly on the refThis is especially useful if you used connect*() methods inside higher order components:
return connectDragSource(
<Something />
);
return <Something ref={instance => connectDragSource(findDOMNode(instance))} />;
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →