top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

    Get Free Article Updates

Facebook Login
Site Registration
Print Preview

About React MDL?

0 votes

What is React MDL?

React-MDL is the React implementation of the already popular Material Design Light framework by google.

MDL is a light weight material design CSS framework which aims on bringing concepts of material design while keeping the UI lightweight.

The current implementation of React-MDL (v1.x) uses the entire MDL library provided by Google. This includes both the MDL css and the MDL javascript. 

Node Commends:

npm install --save react-mdl

Simple Code for Button

npm install --save react{/* Colored FAB button */}
<FABButton colored>
    <Icon name="add" />

{/* Colored FAB button with ripple */}
<FABButton colored ripple>
    <Icon name="add" />

Video for React MDL

posted Jan 4 by Manish Tiwari

  Promote This Article
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

Related Articles

What is React Foundation?

React Foundation Apps is a react port of Foundation Apps. Foundation Apps is a new framework for building web apps. It has awesome new features like flexbox based grid, motion-ui, and several core components for building web apps. But, javascript components of foundation-apps are built with angular.

The goal is to wrap every part of Foundation into re-usable React components following the framework's best practices. The primary focus is ease-of-use and extensibility. We use pure render components, also known as stateless components, whenever possible to keep the memory usage to a minimum. Stateful components are only used for larger components, such as ResponsiveNavigation, where state is actually necessary. All components are unit-tested to ensure their quality.

Here is a list of the available components:

  • Badge
  • Breadcrumbs
  • Button
  • ButtonGroup
  • Callout
  • CloseButton
  • FlexVideo
  • Grid
  • Icon
  • Label
  • MediaObject
  • Menu
  • Pagination
  • Progress
  • ResponsiveNavigation
  • Switch
  • Tabs
  • Thumbnail
  • TopBar

Example Code for Creating a Button

<div className="button-basics-example">
  <Link>Learn More</Link>
  <Link>View All Features</Link>
  <Button color={Colors.SUCCESS}>Save</Button>
  <Button color={Colors.ALERT}>Delete</Button>


Video for React Foundation



What is React Toolbox?

React Toolbox is a set of React components that implements Google Material Design specification. It's built on top of some the trendiest proposals like CSS Modules (written in SASS), Webpack and ES6. The library harmoniously integrates with your Webpack workflow and it's easily customizable and very flexible.

Bootstrap your application with beautiful Material Design Components

React Toolbox uses CSS Modules by default to import stylesheets written in SASS. In case you want to import the components already bundled with CSS, your module bundler should be able to require these SASS modules.

Although we recommend webpack, you are free to use whatever module bundler you want as long as it can compile and require SASS files located in your node_modules. If you are experiencing require errors, make sure your configuration satisfies this requirement.

Node Installation

 npm install --save react-toolbox

In this minimal example, we import a Button with styles already bundled:

import React from 'react';
import ReactDOM from 'react-dom';
import { Button } from 'react-toolbox/lib/button';

  <Button label="Hello World!" />,

Video Tutorial​


What is React Bootstrap?

React-Bootstrap is a library of reusable front-end components. You'll get the look-and-feel of Twitter Bootstrap, but with much cleaner code, via Facebook's React.js framework. 

React-Bootstrap is a complete re-implementation of the Bootstrap components using React. It has no dependency on either bootstrap.js or jQuery.

You can consume the library as CommonJS modules, ES6 modules via Babel, AMD, or as a global JS script.

React-Bootstrap is compatible with existing Bootstrap themes. Just follow the installation instructions for your theme of choice.

Because React-Bootstrap completely re-implements the JavaScript bits of Bootstrap, it's not automatically compatible with themes that extend the default JavaScript behaviors.

The Bootstrap code is so repetitive because HTML and CSS do not support the abstractions necessary for a nice library of components. That's why we have to write btnthree times, within an element called button.

The React.js solution is to write directly in Javascript. React takes over the page-rendering entirely. 


$ npm install react-bootstrap --save


$ bower install react react-bootstrap

Example Code: For Rending Button

var button = React.DOM.button({
  className: "btn btn-lg btn-success",
  children: "Register"

React.render(button, mountNode);

Video Tutorials:


What is React.Js?

ReactJS, is an open-source JavaScript library for creating user interfaces that aims to address challenges encountered in developing single-page applications. It is maintained by Facebook, Instagram and a community of individual developers and corporations.

React is a UI library developed at Facebook to facilitate the creation of interactive, stateful & reusable UI components. It is used at Facebook in production, and is written entirely in React.

React is intended to help developers build large applications that use data that changes over time. Its goal is to be simple, declarative and composable. React only handles the user interface in an app; it is considered to only be the view in the model–view–controller (MVC) software pattern, and can be used in conjunction with other JavaScript libraries or larger MVC frameworks such as AngularJS. 

It also uses a concept called the Virtual DOM that selectively renders subtrees of nodes based upon state changes. It does the least amount of DOM manipulation possible in order to keep your components up to date.

Video for React.js

What is JSX?

JSX is a preprocessor step that adds XML syntax to JavaScript. You can definitely use React without JSX but JSX makes React a lot more elegant. Just like XML, JSX tags have a tag name, attributes, and children.
JSX is a statically-typed, object-oriented programming language designed to run on modern web browsers. ​


  • JSX is faster because it performs optimization while compiling code to JavaScript.
  • It is also type-safe and most of the errors can be caught during compilation.
  • JSX makes it easier and faster to write templates if you are familiar with HTML.

Simple Example

import React from 'react';

class App extends React.Component {
   render() {
      return (
            <p>This is the content!!!</p>

export default App;

Video for JSX


We have learned class in the previous section. Class is a reference type. C# includes a value type entity, which is called Structure. A structure is a value type that can contain constructors, constants, fields, methods, properties, indexers, operators, events and nested types. A structure can be defined using the struct keyword.

Example: Structure

public struct Discounts
    public int Cloths { get; set; }
    public int HomeDecor { get; set; }
    public int Grocery { get; set; }

A struct can be initialized with or without the new keyword same as primitive variable or an object. You can then assign values to the members of the structure as shown below.

Example: Initialize a structure

Discounts saleDiscounts;

saleDiscounts.Cloths = 10;
saleDiscounts.HomeDecor = 5;
saleDiscounts.Grocery = 2;

A struct is a value type so it is faster than a class object. Use struct whenever you want to just store the data. Generally structs are good for game programming. However, it is easier to transfer a class object than a struct. So do not use struct when you are passing data across the wire or to other classes.

Example: structure

struct Point
    private int _x, _y;

    public int x, y;

    public static int X, Y;

    public int XPoint {
              return _x;

            _x = value;

    public int YPoint
            return _y;
            _y = value;

    public event Action<int> PointChanged;

    public void PrintPoints()
        Console.WriteLine(" x: {0}, y: {1}", _x, _y);

    public static void StaticMethod()
        Console.WriteLine("Inside Static method");

The above structure consists of different types of properties and events for the demo purpose. It includes private fields _x, _y, public fields x and y, static fields X and Y, public properties XPoint and YPoint, and PointChanged event. It also includes static and non-static methods. Notice that we raise the PointChanged event whenever XPoint or YPoint changes.

In the following code, we initialize the above Point struct with the new keyword as we initialize the class and also handle the PointChanged event:

Example: structure

class Program
    static void StructEventHandler(int point)
        Console.WriteLine("Point changed to {0}", point);

    static void Main(string[] args)

        Point p = new Point();
        p.PointChanged += StructEventHandler;
        p.XPoint = 123;


Inside Static Method 
Point changed to 123 
X: 123, y: 0

Please note that if you want to use properties, methods or events, you MUST initialize the struct with the new keyword. The following will give a compile time error:

Example: structure

Point pto;

pto.XPoint = 100; // compile time error

Characteristics of Structure:

  • Structure can include constructors, constants, fields, methods, properties, indexers, operators, events & nested types.
  • Structure cannot include default constructor or destructor.
  • Structure can implement interfaces.
  • A structure cannot inherit another structure or class.
  • Structure members cannot be specified as abstract, virtual, or protected.
  • Structures must be initialized with new keyword in order to use it's properties, methods or events.

Difference between struct and class:

  • Class is reference type whereas struct is value type
  • Struct cannot declare a default constructor or destructor. However, it can have parametrized constructors.
  • Struct can be instasntiated without the new keyword. However, you won't be able to use any of its methods, events or properties if you do so.
  • Struct cannot be used as a base or cannot derive another struct or class.

Points to Remember :

  1. Structure is a value type and defined using struct keyword.
  2. Structure can be initialized with or without new keyword.
  3. Structure must be initialized with new keyword to use its' properties, methods and events.
Contact Us
+91 9880187415
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.