Replies: 1 comment
-
See my answer here |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to understand every line of this beautiful example: https://codesandbox.io/embed/r5qmj8m6lq
Could you please suggest from where the "index" argument on line 12 is taken?
const fn = (order, down, originalIndex, curIndex, y) => index =>
I've tried console.logging index and it returns this:
The index clearly depends on the number of the springs generated, but how exactly does the fn function get the index value?
Thanks a million!
Upd:
By console.logging I've found out that fn(order.current) on line 19 is calling the return function instead of the fn itself, and passes two arguments there. But could you please help to find out where might this behaviour be defined?
I'm just trying to avoid the confusion in the future)
Peace & love!
Beta Was this translation helpful? Give feedback.
All reactions