LoigeLoige

#lua

1 post in this collection

Emerging JavaScript pattern: multiple return values

In this article, I want to explore an interesting pattern that I am seeing more and more in JavaScript code which allows you to return multiple values from a function. You probably know already that JavaScript does not support multiple return values natively, so this article will actually explore some ways to “simulate” this behavior. One of the most famous usages of this pattern I have seen recently is within React Hooks, but before delving into that, let’s see what I mean with “multiple return values” by…

Luciano Mammino's Profile pictureLuciano Mammino#javascript, #node-js, #design-patterns, #react, #lua, #go11 November, 201815 min

Read the post →

Loige.co

Copyright © Luciano Mammino 2014-2023.

Built with Gatsby, Coffee and a lot of ❤︎.

Loige logo designed by Andrea Mangano.

Hosted on GitHub, accelerated by Cloudflare.

Theme inspired by React documentation.

Icons by Font Awesome.

Explore
BlogSpeakingAboutComment Policy