| linktree | https://linktr.ee/curiouscoder |
| linktree | https://linktr.ee/curiouscoder |
State of React 2024 Survey Results are out!
approach increases modularity and code reusability by allowing you to create specialized functions by partially applying arguments.
What is Currying?
#currying, named after Haskell Curry (1900-1982), is a technique of transforming a function that takes multiple arguments into a sequence of functions, each taking a single argument. For example, a function f(a, b, c) becomes f(a)(b)(c).
This is accomplished using closures. When you call f(a), it returns a new function that "remembers" the value of a. When you then call that returned function with b, it returns another function that remembers both a and b, and so on. This ...
Closure Explained!
It simply means a function can access variables from its outer function, even after the outer one finishes running. This "closed-off" space with remembered variables is the #closure.
What is TanStack?
#TanStack is a collection of #JavaScript libraries that provide convenient tools for common problems when building a web application, such as data fetching and caching, client-side routing, state management and more.
They're also working on a full-stack React framework called 'TanStack Start', which is currently in beta. It will include SSR, Streaming, Server functions, bundling (Vite) and more.
Merry Christmas everyone! 🎄 🎅
...useful for complex calculations.
What is a Generator in #JavaScript?
A #generator is like a regular function, but with stepwise execution control. Instead of executing from start to finish in one go (like normal functions), a generator can pause and resume its execution, remembering its state and continue evaluating from there.
To do that, we must use the 'yield' keyword. If we use 'return', we will stop our Generator and can return a final value.
So a Generator can 'generate' something on demand, which can be...