react-npm-skeleton
v2.14.0
Published
A skeleton project for creating react components packaged with npm
Downloads
19
Readme
react-npm-skeleton
Basic React app. An ES6 skeleton project for creating react components packaged with npm. This project just aim to display Hello World with React.
Features
- Display Hello World with h2 tag.
- Runs in the browser and Node.js.
- Built on standards.
Example
import React,{Component} from 'react';
import ReactDOM from 'react-dom';
import HelloWorld from 'react-npm-skeleton';
class App extends Component {
constructor(props){
super(props);
}
render() {
return(
<div>
<HelloWorld />
</div>
);
}
}
ReactDOM.render(<App />,document.querySelector('.container'));
This example would render: "Hello World" in H2 tag into the container element on the page.
Technology Stack:
- react
- mocha
Usage:
Clone the repo as a new project:
git clone https://github.com/lobdev/react-npm-skeleton.git <shiny-new-project>
Start Server:
First you have to replace the lib/component/hello_world.js to server.js in package.json
cd shiny-new-project
npm i
npm start
Run App:
npm start command automatically initiate browser at 3000 port
http:://localhost:3000
Run tests:
cd shiny-new-project
npm i
npm test
Developer Notes:
Make sure you configure your editor/IDE to use:
.editorconfig
.eslintrc