Zone of Development

by Damiano Abballe

Category: React

React – Form

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 – How to add Bootstrap in a project

In this post, we will see how to add Bootstrap in the project created in the post: React – Fetch data in Class component. First of all, we install the last version of Bootstrap using the command npm install –save bootstrapThen, we delete the code used to define the table’s style in the file in […]

Read More

React – Fetch data using Axios

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

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

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

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 without an index

In this post, we will see how to render a list without an index in React. First of all, we create a function component called listusersnoindex where, we will define an array of string: [listusersnoindex.js] Then, we modify the file App.js in order to add the component: [App.js] If we run the application, this will […]

Read More

React – How to render a list

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

React – How to manage onClick event

In this post, we will see how to manage onClick event in React. FUNCTION COMPONENT: We create a function component called FunctionEvent: [FunctionEvent.js] Then, we add this component into App.js: [App.js] If we run the application, this will be the result: CLASS COMPONENT: We create a Class component called ClassEvent [ClassEvent.js] Then, we add this […]

Read More

React – How to call a method from a component to another

In this post, we will see how to call a method from a component to another in React. First of all, we create a Class component called Page1 where we will define a method called ChangeText, used to change the text in a label.Then, we will create a Function component called Page2 and a Class […]

Read More