Skip to content

Commit

Permalink
Update FAQ.md
Browse files Browse the repository at this point in the history
As this would be the next place to look when encountering this issue and reading over the line in DropTarget.md
  • Loading branch information
MartijnHols committed Jul 12, 2016
1 parent 71c13cf commit bdcd120
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/00 Quick Start/FAQ.md
Expand Up @@ -79,6 +79,10 @@ Both [`DragSource`](docs-drag-source.html) and [`DropTarget`](docs-drop-target.h

Because [`DragSource`](docs-drag-source.html) and [`DropTarget`](docs-drop-target.html) use the partial application, you may compose them using a functional composition helper such as [`_.flow`](https://lodash.com/docs#flow). In ES7, you can just stack the decorators to achieve the same effect.

### Why is the `component` parameter always `null` in the `beginDrag`/`endDrag`/`drop`/`hover` methods?

When using [stateless components](https://facebook.github.io/react/docs/reusable-components.html#stateless-functions), the `component` parameter will always be `null` in the `beginDrag`/`endDrag`/`drop`/`hover` methods. This is because it is not possible to attach a ref to a stateless function component as explained in [the React docs](https://facebook.github.io/react/docs/reusable-components.html#stateless-functions).

-------------------
```js
var DragSource = require('react-dnd').DragSource;
Expand Down

0 comments on commit bdcd120

Please sign in to comment.