Embedding Expressions In JSX

Embedding Expressions In JSX

JSX is an extension to the JavaScript language, and therefore it can accept any valid JavaScript expressions placed inside the curly braces. For example, 4 + 4, user.firstName, or formatName(user) are all valid JavaScript expressions. This allows you to make your JSX more dynamic. In this tutorial we’ll take a look at some additional examples of embedding expressions in JSX markup, as well as some of the rules associated with rendering more than one html tag in a JSX expression.…

Create A React Element From Scratch

Create A React Element From Scratch

In this tutorial we are going to create a React Element from scratch. This will show us a little bit about why we first import React and ReactDOM as well as how a JSX expression gets converted to an Object for the Browser to use. We are making use of the Create React App, however we will delete the welcome component and start at the beginning.…

Create React App Tutorial

Create React App Tutorial

Create React App is a great tool to get you up and running with React.js very quickly. Front end development is complicated with so many build tools your head will spin. Create React App takes all that complexity and makes it simple. All you need to do is install the package using npm, and then run a few simple commands to get a new project created and up and running.…

How To Display API Data Using React.js

How To Display API Data Using React

In this React tutorial, we’ll keep building on the React Form from the last tutorial. Now we want to be able to fetch data from an API and work with that data in a meaningful way. To do this we’ll need to make use of an array to manage state at the top-level of the application in the App component. We’ll then set up a couple of other components and share state with them via the props object.…

A Simple React.js Form Example

A Simple Reactjs Form Example

The prior tutorial introduced us to creating components in React and using state and props with those components. So far, those components have been function based. Now we want to take a look at how to create components in React using the class syntax. In React you can accomplish the same types of things using either Stateful Functions, or using Class Components. Which approach you choose is up to you.…