What is JSX? Introduction to JSX in React

What is JSX? JSX is an XML-like syntax extension for JavaScript. It doesn’t have any defined semantics and browsers don’t understand JSX. To render React components to DOM, we need a preprocessor also known as a transpiler to transform JSX to standard JavaScript. Let’s start with a simple example. let hello = <h1>This is a... » read more

Passing data to and from nested components in React

What are nested components in React? In lesson 5, we created a simple component using classes in JavaScript, whereas, in lesson # 6 we learned to create a component using functions. For the sake of review, let’s create two components using functions and classes. Index.js import React, { Component } from 'react' import ReactDOM from... » read more

Style Components React

How to Style React components In the previous lesson, we have created a React component that displays a recipe of Taco Slaw with an image. Let’s review its file structure to understand where we need to put our CSS file(s). For the sake of simplicity, we will create a file ‘style.css’ in the root directory.... » read more

React components Import & Export

Importing and exporting React components So far, we have learned how to write our React and JSX code in a single file – index.js But remember, one of the main benefits of using React is to create components. Now, putting every component inside a single file isn’t practical or good practice. React has a convention... » read more

React Functional Components

Creating functional components in React First, let’s install the React development tools or extensions for your web browser. You can install the new development tools from the Chrome Web Store. Click on the ‘Add to Chrome’. After the installation, you can go to the console area to find out a new tab for React. The... » read more

React Components

Creating your first component in React React components are the core building blocks of the React application. React components are created when you extend from the React’s component class. To create a component in the React, you must be familiar with import/export, and classes in the JavaScript ES6. React application folder Structure Once you have... » read more

React First Program

Write your first program in React – the easy way To work with React in the web browser, we need to include two libraries: React and ReactDOM. Prior to version 0.14, ReactDOM was part of React and only recently they were separated as two different libraries to facilitate React Native. ReactDOM contains ReactDOM.render() method which... » read more

React Installation and Configuration

How to install React js? There are two ways to install React: Web Page Installation This first method isn’t what most of the people use to set up React but it is the easiest way and aims for the beginners. If you ever have used any other JavaScript library such as jQuery, this is the... » read more

Minimum JavaScript you need to learn React

Want to learn React? But do you know JavaScript well-enough? Well, in this lesson we are going to learn or revisit the basic concepts of JavaScript ES6 you are going to use while programming in React. React JavaScript Requirements Since its release back in 1995, JavaScript has gone throw many changes. The updates are community-driven.... » read more

Load Text from File to String variable using C#

In this example, we will show you how to load a text file into a string variable in C#. For this purpose, we are going to use the StreamReader.ReadToEnd method to read from a text file on your local machine, or on a network folder. First, you will need to add the namespace below: using... » read more

Introduction to React

If you are looking to learn React using an easy to grasp course, then you have come to the right place. In this lesson, we are going to teach you, step by step, how to use react in the next web development app. This course consists of 26 lessons. It’s very important to study this... » read more

Convert HTML table to JSON string in ASP.NET using C# and JavaScript

In this tutorial, I will explain to you how to convert an HTML table to a JSON string using C#. Convert HTML table to JSON in ASP.NET To get started, insert a static table and an ASP button as shown in the code below: <table class="nav-justified" border="1" id="tblEmployees"> <tr> <td><strong>Name</strong></td> <td><strong>Department</strong></td> </tr> <tr> <td>Jeff</td> <td>IT</td>... » read more

Check if a Number is valid using Java

Below is a snippet to check if a number  is valid or not. For example, the string “1.1.1” contains an invalid number, while the string “2.1” contains a valid number. The Code public class Main { public static void main (String[]args) { int i; System.out.println("Enter a Number:"); String str = System.console().readLine (); try { Double.parseDouble(str);... » read more

Find the Largest Number in an Array using C

Below is a C program with an explanation of how to find the largest number in an array. What is an array? An array is a group of elements of the same data type. It has a consecutive memory location in memory. Each value in the array is called an element. Every element has the... » read more