Posts

Showing posts from July, 2020

A Beginner’s Guide to Arrow Functions in ES6: Part 1

Image
https://medium.com/@josephcardillo?source=follow_footer--------------------------follow_footer- What are the benefits of arrow functions? They are more concise. They have implicit returns. (We’ll get into this below.) They do not rebind the value of  this  when you use an arrow function inside another function. (We’ll get into this in a later post.) How do I convert my ES5 functions to ES6 arrow functions? Let’s start with a simple example using  .map() . *If you need a refresher on  const , see my previous posts  here  and  here . // Let's define an array of first names: const names = ['joe', 'rache', 'micaela']; // If I want to add my last name to each I'll run the following function using .map(): const fullNames = names.map(function(name) { return `${name} cardillo`; }); // In the console when I call: names // It returns: ['joe', 'rache', 'micaela'] // Then if I call the function: fullNames // It returns: ["

How to Learn React — A Roadmap from Beginner to Advanced.

Image
This guide is for people who are starting with React. I have carefully curated the best videos and articles in each section to make it easier for learning. Note:  I’m not associated with any of the websites mentioned below. It’s purely my view. Prerequisites Basic knowledge of HTML, CSS, and JavaScript. Basic understanding of ES6 features. Here’s my  article  explaining some of the ES6 features. To get started you should at least know the following features: 1. Let 2. Const 3. Arrow functions 4. Imports and Exports 5. Classes Basic understanding of how to use  npm . Getting started You can use online code editors to practice, or you can use  Create React App . I have setup a development environment in  JSFiddle  and in  Codepen . To grasp all the fundamentals of React, you can start with the following tutorials: React official documentation  by React Beginners guide to React  by Kent C. Dodds Fundamentals of React  by  Samer Buna By now, you should have a basic idea of the