Giter Site home page Giter Site logo

react-todo-note's Introduction

Master-react-exercise

Install the environment dependencies of React development, transpile our code, and view a React component in a browser.

  • Install React, Browserify, and Babeljs via npm
  • Learn about ES6 and JSX to transpile a code that is ready to run in a browser
  • Write a Hello World component and view it in a browser

Step1: write for package.json

$ cd [folder route]
$ **npm init**

Step2: install react.js

$ nam install —save react react-don babelify babel-preset-react

[email protected] node_modules/react-dom

Step3: install Browserify

Browserify lets you require(‘modules’) in the browser by bundling up all of your dependencies. $ nam install -g browserify

Step4: install Babel.js

$ nam install —save-dev babelify

OPEN package.json and add the “build” to “scripts” with following content:

”build”: “browserify -t [ babelify —presets [ react ] ] src/main.js -o public/bundle.js”

it will look like i.e.

“scripts”: {
	“test”: “echo \”Error: no test specified\” && exit 1”,
	”build”: “browserify -t [ babelify —presets [ react ] ] src/main.js -o public/bundle.js”
}

Step5: run script to create bundle.js

$ npm run build

check bundle.js $ less public/bundle.js

Step6: open html to test

$ open public/index.html

react-todo-note's People

Contributors

sweetymeow avatar

Watchers

James Cloos avatar  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.