Skip to content

Instantly share code, notes, and snippets.

@tankhuu
Last active December 18, 2018 15:56
Show Gist options
  • Save tankhuu/8e776023c78628fa4a6edc04168f9531 to your computer and use it in GitHub Desktop.
Save tankhuu/8e776023c78628fa4a6edc04168f9531 to your computer and use it in GitHub Desktop.
React Application Initiation

Initiation react app

Clone empty project from Source Control

git clone https://github.com/v1/repos/autobots

Install nodeJS

https://nodejs.org/en/

Create React App

npx create-react-app autobots
cd autobots

Development Isolation

With Story book

https://storybook.js.org/ npx -p @storybook/cli sb init

With Styleguidist

https://react-styleguidist.js.org/docs/getting-started.html npm install --save-dev webpack react-styleguidist

Analyzing the Bundle Size

npm install source-map-explorer

Add script into package.json

...
"script": {
  ...
  "analyze": "source-map-explorer build/static/js/main.*",
  ...
}

Analyze code by running

npm run build

Or

npm run analyze

Using HTTPS in Development

HTTPS=true npm start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment