File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -22,18 +22,19 @@ This bundle is also what is loaded when installing from npm. It expects external
2222If you want a UMD version of the latest ` master ` revision, you can generate it yourself from master by cloning this
2323repository and running ` $ make ` . This will create umd dist files in the ` dist/ ` folder.
2424
25- ### Installing with jspm and systemjs ES6 module loader
25+ ### Exports
2626
27- ``` bash
28- $ jspm install npm:react-draggable
29- ```
30-
31- To access the ` Draggable ` component in your own code, you refer to the ` .default ` property of the imported reference.
27+ The default export is ` <Draggable> ` . At the ` .DraggableCore ` property is ` <DraggableCore> ` . Here's how to use it:
3228
3329``` js
34- import * as ReactDraggable from ' react-draggable' ;
35- var Draggable = ReactDraggable .default ;
36- ReactDOM .render (< Draggable / > , ... );
30+ // ES6
31+ import Draggable from ' react-draggable' ; // The default
32+ import {DraggableCore } from ' react-draggable' ; // <DraggableCore>
33+ import {default as Draggable , DraggableCore }; // Both at the same time
34+
35+ // CommonJS
36+ let Draggable = require (' react-draggable' );
37+ let DraggableCore = Draggable .DraggableCore ;
3738```
3839
3940## Draggable
You can’t perform that action at this time.
0 commit comments