C# Label Control

In this lesson, we will go thought the Label Control and some of its important properties and event. Introduction to C# Label Control the Label Control is probably the most used control in a WinForms Applications. It’s used to have a text in it, to label something. Add a label to your Form To add... » read more

Introduction to C# GUI

Desktop Applications were among the first forms of computer software in their early days. Most of the software at that time were developed to function on a client machine. In the early 90′, the web was born and took the world by a storm. However, desktop applications still have a large portion of the development... » read more

Handling Events in React

How do we handling events in React? You may feel comfortable working with events in JavaScript or jQuery, where you write imperative code to handle the events. However, React has a slightly different approach to handle that. Rather than selecting the relative DOM elements and attaching event functions to these, React wraps these in their own... » read more

Understanding state, and life cycle methods in React

React state and life cycle methods The state is different from props in the sense that props is a way to pass data from one component to another. It cannot be changed by the component receiving the props. According to the React documentation, props are immutable which means you can’t change the value of props.... » read more

Validating components in React with prop-types

How to Validate Props in React Data handling within a DOM tree is quite beneficial as it takes away the burden from the app and increases the speed of rendering elements. There are a few techniques you can use when working with data in React components. For the sake of simplicity, we create a functional... » read more

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