GithubHelp home page GithubHelp logo

react-intro's Introduction

Discover React

Part 1 - React Intro

In this part, we'll detail how to set up a basic React todo app, utilizing ES6 syntax, Babel to transpile ES6 to ES5, and Webpack to bundle everything together.

Prerequisites

  1. Work through the React Getting Started guide
  2. Read this props vs state guide, making sure to understand the differences between a React component's props and state

What is React?

React simplifies both the building and maintaining of Single Page Applications by making it easy to create reusible UI components and manage changes (e.g., state) to your application's data.

  • React is a library not a framework. Unlike full JavaScript UI Frameworks, like Angular and Ember, React is just a JavaScript library that provies a view for data rendered as HTML. Put another way, it's the view in MVC!
  • It's an implementation of Web Components, the new standard for custom HTML5 UI elements
  • Compared to AngularJS directives: "React is all about building reusable components. In fact, with React the only thing you do is build components. Since they're so encapsulated, components make code reuse, testing, and separation of concerns easy." (Source: Facebook)

Who's using React?

Tools

Modern-day JavaScript development is all about tools. We will utilize:

  • NPM for managing dependncies
  • Webpack for bundling modules
  • Babel for transpiling ES6 to ES5

Let's get them installed!

Start by going to the Node.js Foundation to install both NodeJS and NPM.

Once done, clone down the boilerplate structure (00_todo) and install the remaining dependencies:

Project Structure

Your project structure should now look like this:

├── index.html
├── package.json
├── src
│   ├── components
│   │   └── App.jsx
│   └── index.js
└── webpack.config.js

ADD EXPLANATION OF THE STRUCTURE

webpack-dev-server --progress --colors

Your First Component

It's time to say, "Hello World!"!

  • ES6
  • this.state
  • this.props

Build

DETAIL THE BUILD PROCESS

What's next

  1. RECAP
  2. INFO ON CREATING A TODO APP

Part 2 - React Todo

react-intro's People

Contributors

mjhea0 avatar robhaj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.