On part 1, I went through how to set up a todo app using react, creating components so that when we add a new item to the list, it adds up in the list. Now I am going to cover how to handle the checkmarks to mark an item as completed, handle the delete button and filter the todos with their status.
In the Todo.js component, I created a constant arrow function ‘deleteHandler’ so that I could modify the state using the filter method. In order to pass down the state for the setTodos from App.js to Todo.js, we had…
This week, I decided to create a “Todo” App using React. I’m going to cover how I realized it.
1. First, run the command ‘npx create-react-app your-app-name’ in your terminal. Then start by refactoring the App.js file deleting everything in the <header> and replace it with the name of your choice, in my case ‘Matt’s Todo List’
Hooks are a new addition in React 16.8. They let you use state and other react features without writing a class.
Before the release of Hooks, React Components were divided in two categories depending on whether the component was class-based or function-based.
A Hook is a special function that lets you “hook into” React features.
If you have a function component and you need to add some state to it, previously you had to convert it to a class. Now you can use a Hook inside the existing function component.
There are many hooks in React but I will talk…
Promise is a proxy for a value not necessarily known when the promise is created. In other words, it is an object that may produce a single value in the future: either a resolved value, or a reason that it’s not resolved.
Promise is in one of these states:
In React applications, we use components to split and isolate different parts of the web user interface into individual pieces. These pieces act independently and use a render function to return React elements in JSX. These elements describe how that section should be displayed to the user.
Each component has several “lifecycle methods” that we can override to run code at particular times in the process. It is very similar to our natural lifecycle: we are born, we grow and eventually we die. React components are created by being mounted onto the DOM, they change or grow through updates, and…
I started my job search about a month ago after graduating from Flatiron School on April 2021. Looking at the different job postings, I noticed that a lot of companies had graphQl in their requirements so I decided to start learning it.
It is a query language for reading and mutating data in apis.
As a back-end developer, graphQL provides a type system where you can describe a schema for your data and in turn, this gives front-end consumers of the apis the power to explore and request the exact data they need.
My name is Matthieu, I grew up in France and at the age of 18 years old, I decided to pack my bag and travel the world. After graduating from a culinary school in the management part, I worked at several restaurants in France and Australia. I later had the opportunity to work at Epcot Center in Florida at…
While doing my job search, I noticed that Typescript was required by many companies. I decided to look into this programming language and I am going to do a resume of what I have learned so far.
As developers, we are trying to keep our code as DRY as possible to make our code look easier and not type anymore code…
In this blog, I will go over the steps to create the frontend to build a single login system using React.
One of my first interviews with skilled when preparing for my job hunting, they asked me to explain what was my definition of the virtual DOM in React… In this post, I am going to explain what is my understanding of this mysterious virtual DOM.
Just to get things straight, DOM stands for Document Object Model and is an abstraction of a structured text. For web developers, this text is an HTML code, and the DOM is simply called HTML DOM. Elements of HTML become nodes in the DOM.
The virtual DOM is an abstraction of the HTML DOM. It…
French guy who recently moved to the United States. I am also changing career after having worked 13 years in restaurants. I will be going into coding.