Skip to content

Commit

Permalink
Add a note about performance
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Feb 27, 2015
1 parent 572fdae commit 6c95eb1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/API.md
Expand Up @@ -115,6 +115,8 @@ Returns `{ x, y }` coordinate delta between current mouse position and its posit
Allows you to draw a custom drag layer. This can be used in combination with returning a transparent one-pixel image as `dragPreview` from `beginDrag` so that only your custom layer is visible.
If you have performance problems due to drag layer redrawing on every position change, you should use [`PureRenderMixin`](http://facebook.github.io/react/docs/pure-render-mixin.html) (or manually implement [`shouldComponentUpdate`](http://facebook.github.io/react/docs/advanced-performance.html)) in child components to avoid reconciling them.
##### `getDragLayerState()`
Returns all you need in order to draw a custom drag layer:
Expand Down

0 comments on commit 6c95eb1

Please sign in to comment.