npx create-react-app my-app
Success! Created my-app at C:\Users\Ian\my-app
Inside that directory, you can run several commands:
npm start
Starts the development server.
npm run build
Bundles the app into static files for production.
npm test
Starts the test runner.
npm run eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can’t go back!
We suggest that you begin by typing:
cd my-app
npm start
// https://devhints.io/react
// use this to create components
// https://www.npmjs.com/package/react-create
npm install -g react-create
// Create Home component file that mounts to the DOM
$ react-create component Home --entry
// will generate this Home.js file
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
export default class Home extends Component {
render() {
return (
<div className="home">
{ this.props.children }
</div>
)
}
}
ReactDOM.render(<Home/>, document.getElementById('app'));
swap_vert
createApp
// mkdir or clone from github
// https://reactjs.org/docs/getting-started.html
npx create-react-app my-app
cd my-app
npm start
create-react-app newAppName
//cd into newAppName directory
//install libraries for e.g
npm install --save axios react-router react-router-dom redux react-redux redux-logger redux-thunk
// redux-saga, Redux, and isomorphic-fetch to create, fetch, update, complete, and delete tasks.
npm install --save redux-saga, Redux, isomorphic-fetch
///react-router-dom to create a new route to a detailed view of a task: