Tag Archives: React

React – Router

By | 19/05/2021

In this post, we will see how to manage the Routing in React.In a nutshell, we will see how it is possible to move between different parts of an application. First of all, we create a React project called “test router” (using the command npx Create-react-app testrouter) and we modify the file App.cs: [APP.CS] Then,… Read More »

React – Form

By | 02/12/2020

In this post, we will see how to create a Form in React in order to manage a login formed by Username, Password and UserType. First of all, we create a file called reactform where we will define the form: Then, we define two input HTML objects for handling Username and Password: Finally, we define… Read More »

React – Fetch data using Axios

By | 04/11/2020

In this post, we will see how to fetch data in React using a library called Axios, modifying the application created in the post: React – Fetch data in Class component.Axios is a promise based HTTP client for the browser and Node.js and, it makes easy to send asynchronous HTTP requests to REST endpoints and… Read More »

React – Fetch data in Class component

By | 30/09/2020

In this post, we will see how to fetch data in a Class component.In the React web site, they advise to use the method componentDidMount() because, “is invoked immediately after a component is mounted (inserted into the tree). Initialization that requires DOM nodes should go here. If you need to load data from a remote… Read More »

React – Hooks

By | 16/09/2020

In this post, we will see how to use Hooks in React.But, what are Hooks?From React web site:“Hooks are a new addition in React 16.8. They let you use state and other React features without writing a class.“ STATE HOOKS We open Visual Studio Code and we create a file called State.js: [STATE.JS] Now, if we… Read More »

React – Tips

By | 04/09/2020

In this post, we will see three tips that can help us in develop of React applications. CODESANDBOXCodesandbox is an instant IDE and prototyping tool for rapid web development. We can use it to create prototype for example in React, Angular or Vue, from anywhere, on any device without setup and using only a browser.We… Read More »

React – How to render a list

By | 07/07/2020

In this post, we will see how to render a list of objects in React. First of all, we create a function component called listuser, where we will define a list of users: [LISTUSER.JS] Then, using the Javascript method map, we will display the list: Finally, we add the component listuser in App.js: If we… Read More »