AngularJS .. ReactJS

What are Angular and React? That’s a great history of JavaScript! So why are we hearing so much about Angular and React? Are these JavaScript frameworks? There’s a question as to whether or not Angular and React are frameworks. They’re usually included in lists of popular JavaScript frameworks, but React itself is very adamant that… Seguir leyendo AngularJS .. ReactJS

CREATE REUSABLE COMPONENTS

import React, { Component } from “react”; class Button extends React.Component { handleClick = () => { this.props.onClickFunction(this.props.incrementValue); }; render() { return ( <button onClick={this.handleClick}> +{this.props.incrementValue} </button> ); } } const Result = props => { return ( <div> {props.counter} </div> ); }; class App extends React.Component { state = { counter: 0 }; incrementCounter… Seguir leyendo CREATE REUSABLE COMPONENTS

Publicada el
Categorizado como React JS

ReactJS & NodeJS Comments App.

In this case using NodeJS and ReactJS at the same project. The React has server example  for NodeJS, Ruby, Python, PHP. We can clone de repository and after install all dependencies. For that first : git clone https://github.com/reactjs/react–tutorial.git comments npm install Run the App : npm start The file server.js is used express module in order to… Seguir leyendo ReactJS & NodeJS Comments App.

React PropTypes

When you create a class with React, using the createClass method. We can use some properties and methods in order to manage behavior of our class. for this let’s use points : propTypes and getDefaultProps. propTypes : We can set the properties of the class. getDefaultProps: We can set default values. So we can set the components… Seguir leyendo React PropTypes