This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Lukas Imrich
Posted Dec 21 - Read on Facebook

I enjoy framer a lot, because it helps me to understand developers and their point of view.
Not just that, I am learning, slowly yet steadily some programming skills. Thank you for that, Framer.
Now, I came to the point, in which I am ok with basics in CoffeeScript and I would like to stretch my coding skills. Specifically, to understand and to be able to use concept of closures.

I am not asking for explanation here, rather show me a UI/interaction/animation exercise, which could be elegantly solved by closures in Framer.

Thanks in advance :)


Josef Richter

I wouldn't worry about closures ;-) If you want to get your hands dirty in order to better understand app concepts and be more helpful to developers, you should try some simple stuff in Swift or React Native - I believe that will give you much more value.

Lukas Imrich

I believe so as well. :)

However, I really like the way that programming challenges abstract thinking. Closures seems to be one of those concepts that are not immediately clear, at least to me. I would like to understand it, it is sort of a puzzle that is waiting to be solved :).

I would like to solve that puzzle, even though there are more meaningful concepts to learn.

PS I already read some stuff, tried some stuff, yet still missing that feeling "got it". I thought, there could be a use case for closures while animating and using events, or just somewhere :).

Benjamin Den Boer

Hey Lukas Imrich, here is a .framer file I keep at hand for closures. We create a function with a single parameter. The function contains an inner function, with its own parameter, yet it also uses our outer parameter. In this case, we can say that our inner function has "closure" over it.

Check out this project in Studio →

Read the entire post on Facebook