Skip to content

Commit b2d9cce

Browse files
slorberhramos
authored andcommitted
Add details for forkEvent (facebook#403)
it was unclear to me if `event` could actually be a considered as an opaque structure, ie if it would work as expected for any kind of thing the user can actually provide as a `onScroll` listener for example. It should be clear that it's safe to call with null or regular js listener cc @sahrens
1 parent 258277c commit b2d9cce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/animated.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ Config is an object that may have the following options:
367367
static forkEvent(event, listener)
368368
```
369369
370-
Advanced imperative API for snooping on animated events that are passed in through props. Use values directly where possible.
370+
Advanced imperative API for snooping on animated events that are passed in through props. It permits to add a new javascript listener to an existing `AnimatedEvent`. If `animatedEvent` is a simple javascript listener, it will merge the 2 listeners into a single one, and if `animatedEvent` is null/undefined, it will assign the javascript listener directly. Use values directly where possible.
371371
372372
---
373373

0 commit comments

Comments
 (0)