Displaying 1 to 4 from 4 results

You-Dont-Know-JS - A book series on JavaScript. @YDKJS on twitter.

  •    

This is a series of books diving deep into the core mechanisms of the JavaScript language. The first edition of the series is now complete.Please feel free to contribute to the quality of this content by submitting PR's for improvements to code snippets, explanations, etc. While typo fixes are welcomed, they will likely be caught through normal editing processes, and are thus not necessarily as important for this repository.

Closures - Swifty closures for UIKit and Foundation

  •    Swift

Closures is an iOS Framework that adds closure handlers to many of the popular UIKit and Foundation classes. Although this framework is a substitute for some Cocoa Touch design patterns, such as Delegation & Data Sources and Target-Action, the authors make no claim regarding which is a better way to accomplish the same type of task. Most of the time it is a matter of style, preference, or convenience that will determine if any of these closure extensions are beneficial. Whether you're a functional purist, dislike a particular API, or simply just want to organize your code a little bit, you might enjoy using this library.

weakable-self - A Swift micro-framework to easily deal with weak references to self inside closures

  •    Swift

Closures are one of Swift must-have features, and Swift developers are aware of how tricky they can be when they capture the reference of an external object, especially when this object is self. The purpose of this micro-framework is to provide the developer with a helper function weakify that will allow him to declaratively indicate that he wishes to use a weak non-optional reference to self in closure, and not worry about how this reference is provided.

react-bind-closures - Bind closures to stateless React components to avoid creating closures at render time

  •    Javascript

Many React developers are beginning to prefer and advocate for creating stateless React components with pure functions. While these "dumb" components are simple and more predictable, they can come with some performance issues. The biggest problem they face is how to avoid creating closures. A big React anti-pattern is to create closures at render time because multiple renders means multiple closures which means more object creation and GC time (link).