Cristian Salcescu's Blog, page 16
March 1, 2021
Why You Haven’t Understood the Currying Technique
If you make a quick google search for currying these are the first kind of examples you will find.
February 28, 2021
How to Render a List with React, GraphQL, and Apollo
In this article, we are going to take a look at how to retrieve and display a list of objects using React Hooks, GraphQL, and Apollo…
How to Have Encapsulation in JavaScript
Encapsulation is about data-hiding. That’s it, we have private data behind public methods working with that data.
February 26, 2021
A Study Plan to Start with React

In this post, you can find a few milestones for starting out with React and some helping materials.
JavaScript FundamentalsFundamentals: primitives, objects, functions, arrays, this keywordLearn these JavaScript fundamentals and become a better developer
ES6 features: let, const, modules, spread operator, rest parameter, property short-hands, destructuring assignment, default parameters, template string literals, promises, classes, arrow functionsl...Simple but Powerful JavaScript Concepts
In this article, we will take a look at some simple but powerful concepts in JavaScript: values, arrays, objects, functions, and variables.
February 24, 2021
How to Add Conditional Elements to Array and Object Literals

In this short post, you can see how to initialize array and object literals with conditional entries.
Array LiteralLet’s start with the array literal.
Below is an example using the conditional operator to decide between an array with one element and an empty array. Then the spread operator is used to put all the elements from that result into the initial array.
const canAdd = true;const arr = [1,
...canAdd ? [2] : [],
3
];console.log(arr);
//[1,2,3]
To simplify this scenario we can create a helper...
February 23, 2021
How to Build the Counter App Using Only Pure Functions
February 8, 2021
Exploring Alternatives to the Switch Statement in the Redux Reducer
For a long time, the switch statement was promoted as a good practice inside the reducer function. I don’t it is such good practice so, in…
February 6, 2021
A Few Functional Programming Exercises
This article contains a few exercises that you can use to practice your functional programming skills.
February 3, 2021
Why I Can’t Explain What Currying Is
I can’t explain what currying is because first, you need to know what higher-order functions are.