Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
react-dragula
Advanced tools
Readme
Drag and drop so simple it hurts
Official React wrapper for dragula
.
Try out the demo!
You can get it on npm.
npm install react-dragula --save
Or bower, too.
bower install react-dragula --save
Refer to the documentation for dragula
. The API for react-dragula
is identical, but a few tiny tweaks were made around it so that it works out the box with React.
Here's an example application using react
and react-dragula
.
var React = require('react');
var dragula = require('react-dragula');
var App = React.createClass({
render: function () {
return <div className='container'>
<div>Swap me around</div>
<div>Swap her around</div>
<div>Swap him around</div>
<div>Swap them around</div>
<div>Swap us around</div>
<div>Swap things around</div>
<div>Swap everything around</div>
</div>;
},
componentDidMount: function () {
var container = React.findDOMNode(this);
dragula([container]);
}
});
React.render(<App />, document.getElementById('examples'));
Here's an example using refs (ES2015 syntax): React: The ref Callback Attribute
import * as React from "react";
import * as ReactDOM from 'react-dom';
import Dragula from 'react-dragula';
export class App extends React.Component {
render () {
return <div className='container' ref={this.dragulaDecorator}>
<div>Swap me around</div>
<div>Swap her around</div>
<div>Swap him around</div>
<div>Swap them around</div>
<div>Swap us around</div>
<div>Swap things around</div>
<div>Swap everything around</div>
</div>;
},
dragulaDecorator = (componentBackingInstance) => {
if (componentBackingInstance) {
let options = { };
Dragula([componentBackingInstance], options);
}
};
});
ReactDOM.render(<App />, document.getElementById('examples'));
MIT
FAQs
Drag and drop so simple it hurts
The npm package react-dragula receives a total of 19,697 weekly downloads. As such, react-dragula popularity was classified as popular.
We found that react-dragula demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.