Open in app

Sign In

Write

Sign In

Cristian Salcescu
Cristian Salcescu

4.5K Followers

Home

About

Published in Frontend Essentials

·Mar 8

Generating Random Numbers and Strings

Quick start with Math.random — How would you generate a random number? What about a random string? You may already know the built-in Math.random function. It generates a random number between 0 and 1, not including the 1 number. Generating a Random Number Below is an example of using this utility. const no = Math.random(); console.log(no); //0.9045660913804647 As you…

JavaScript

3 min read

Generating Random Numbers and Strings
Generating Random Numbers and Strings
JavaScript

3 min read


Published in Frontend Essentials

·Feb 24

State Management with React Hooks

The book is available in kindle and paperback formats — The State Management with React Hooks book is available in kindle and paperback formats. State management is a common challenge when developing web applications. This book explores state management with React Hooks by building several small applications. Here are some of the things we will go through: Understand what state…

React

3 min read

State Management with React Hooks
State Management with React Hooks
React

3 min read


Published in Frontend Essentials

·Oct 3, 2022

Picking Playing Cards from a Deck with React Hooks

Maps of Unicode characters, creating and shuffling a deck, and more — Do you want to know how to render a card with React Hooks or how to shuffle a deck of playing cards? In a previous article, we looked at how to render a playing card from a single suite with React Hooks. Next, we can extend that and show any…

React

5 min read

Picking Playing Cards from a Deck with React Hooks
Picking Playing Cards from a Deck with React Hooks
React

5 min read


Published in Frontend Essentials

·Sep 30, 2022

How to Create and Delete a Git Branch

Creating and deleting local and remote development branches — Some of the basic things we may need to do when working on a feature involved creating a development branch and then deleting that branch after merging all the changes. Here is how we can do that. Creating a Local Branch Below is an example of creating a new branch new-dev-branch from the master…

Git

2 min read

How to Create and Delete a Git Branch
How to Create and Delete a Git Branch
Git

2 min read


Published in Frontend Essentials

·Sep 29, 2022

3 Ways to Render a List in Elm, Not All Available in React

How to render a List with Elm — In this article, we get back to Elm. Do you remember it? It is the pure functional language used to build web applications. In a previous post, we looked at how to render a list in React. Now, we check how to do the same rendering in Elm. Let’s start. Using an Inline Function …

Elm

4 min read

3 Ways to Render a List in Elm, Not All Available in React
3 Ways to Render a List in Elm, Not All Available in React
Elm

4 min read


Published in Frontend Essentials

·Sep 26, 2022

Checking if Elements Exist in Large Arrays Using a Curried Utility Function

Maps, composite keys, default parameters, and more — In a previous article, we looked at how to search for elements in a large array. There we conclude that is faster to access such elements in an associated map instead of searching for them in the list. When checking to see if an element is present in a large…

JavaScript

4 min read

Checking if Elements Exist in Large Arrays Using a Curried Utility Function
Checking if Elements Exist in Large Arrays Using a Curried Utility Function
JavaScript

4 min read


Published in Frontend Essentials

·Sep 23, 2022

Removing Duplicates From an Array of Objects Using a Generic Utility

Using a generic key name, composite key, and more — In a previous article, we looked at how to remove duplicates from an array. This time we start from that code and try to encapsulate it into a generic utility. Let’s first remember the solution we are going to use. Consider the following list of books. const arr = […

JavaScript

4 min read

Removing Duplicates From an Array of Objects Using a Generic Utility
Removing Duplicates From an Array of Objects Using a Generic Utility
JavaScript

4 min read


Published in Frontend Essentials

·Sep 22, 2022

About the State Management of a Contenteditable Element in React

Controlled input, onInput event, e.target.innerHTML, and more — In HTML, elements can be editable. By doing so the web page can be transformed into a rich text editor. Set the contenteditable attribute on an HTML element to make it editable. Basically, this page in Medium is a content editable element.

React

4 min read

About the State Management of a Contenteditable Element in React
About the State Management of a Contenteditable Element in React
React

4 min read


Published in Frontend Essentials

·Sep 21, 2022

How to Debounce/Throttle a Callback with React Hooks

Debounce, throttle, useCallback hook, and more — In a previous post, we looked at how to create a hook providing both the current value and the debounced value for a text input. This time we will just debounce or throttle the input callback received by a component. Let’s start by creating a simple component managing a search…

React

4 min read

How to Debounce/Throttle a Callback with React Hooks
How to Debounce/Throttle a Callback with React Hooks
React

4 min read


Published in Frontend Essentials

·Aug 29, 2022

3 Default Behaviours When Submitting HTML Forms

Default button type, default form method, pressing Enter in inputs, and more — There are some default behaviors that happen when using an HTML form that is worth discussing. This way you will avoid surprises. Let’s start. 1. The Default Type of a Button is Submit Just putting the <button> tag into a page without specifying its type is the same as creating a button with the type submit. <button>Click</button> <button type="submit">Click</button>

HTML

3 min read

3 Default Behaviours When Submitting HTML Forms
3 Default Behaviours When Submitting HTML Forms
HTML

3 min read

Cristian Salcescu

Cristian Salcescu

4.5K Followers

Author of Functional Programming in JavaScript. Enthusiastic about sharing ideas. https://www.amazon.com/gp/product/B08X3TPCQ8

Following
  • The Pragmatic Programmers

    The Pragmatic Programmers

  • Federico Kereki

    Federico Kereki

  • Medium Creators

    Medium Creators

  • Joel Thoms

    Joel Thoms

See all (8)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech