This is an react app which is set up without create-react-app command.
To set up react app from scratch with webpack:
npm init
npm i --save-dev webpack webpack-cli webpack-dev-server html-webpack-plugin
npm i @babel/plugin-transform-runtime @babel/preset-env @babel/preset-react babel-loader
npm i react react-dom
- Create
webpack.config.js
, set mode to development, add HtmlWebpackPlugin - Add scripts to
package.json
"scripts": {
"start": "webpack serve",
"build": "webpack",
"test": "echo \"Error: no test specified\" && exit 1"
},
Entry point: src/index.js
HTML: publick/index.html
- Simple CountClicks component without jsx: no_jsx_components
- Using context: using_context
- Simple modal with render prop content: render_prop
- Refs: refs
- Get data from file input after for submission,
- Set focus on nested text input
- URL shortener