From 9f072ba5d3eab66b0194701bd60ad6a8044855bf Mon Sep 17 00:00:00 2001 From: Tim Haywood Date: Fri, 18 Sep 2020 21:11:41 +1000 Subject: [PATCH] add destructuring note --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index bc5d224..f4d2478 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,14 @@ const inKeys = [ eKeys.animate(inKeys, time); ``` +You can also [destructure](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) `animate` from the `sourceData` object: + +```javascript +const { animate } = footage('eKeys.jsx').sourceData; +// ... +animate(inKeys, time); +``` + [Back To Top ↑] ## Helpful Snippets