Suche senden
Hochladen
Build a React PWA with Material UI and Webpack
•
0 gefällt mir
•
201 views
Durch KI verbesserter Titel
M
Makoto Mori
Folgen
いまさら始める React 2019
Weniger lesen
Mehr lesen
Ingenieurwesen
Melden
Teilen
Melden
Teilen
1 von 59
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
Articulo java web
Articulo java web
I.S.T. Santo Domingo
Google
Google
soon
Deploying
Deploying
soon
Dandelion 0.10.0
Dandelion 0.10.0
Thibault DUCHATEAU
Odoo - CMS performances optimization
Odoo - CMS performances optimization
Odoo
Diy frozen snow globe
Diy frozen snow globe
raveenashrynayr03
AtlasCamp 2010: Understanding the Atlassian Platform - Tim Pettersen
AtlasCamp 2010: Understanding the Atlassian Platform - Tim Pettersen
Atlassian
AtlasCamp 2013: Modernizing your Plugin UI
AtlasCamp 2013: Modernizing your Plugin UI
colleenfry
Empfohlen
Articulo java web
Articulo java web
I.S.T. Santo Domingo
Google
Google
soon
Deploying
Deploying
soon
Dandelion 0.10.0
Dandelion 0.10.0
Thibault DUCHATEAU
Odoo - CMS performances optimization
Odoo - CMS performances optimization
Odoo
Diy frozen snow globe
Diy frozen snow globe
raveenashrynayr03
AtlasCamp 2010: Understanding the Atlassian Platform - Tim Pettersen
AtlasCamp 2010: Understanding the Atlassian Platform - Tim Pettersen
Atlassian
AtlasCamp 2013: Modernizing your Plugin UI
AtlasCamp 2013: Modernizing your Plugin UI
colleenfry
Progressive Downloads and Rendering
Progressive Downloads and Rendering
Stoyan Stefanov
How to make a WordPress theme
How to make a WordPress theme
Hardeep Asrani
E2 appspresso hands on lab
E2 appspresso hands on lab
NAVER D2
Drupal as a web framework
Drupal as a web framework
Adam Kalsey
Presentation
Presentation
Manav Prasad
Jsp
Jsp
Manav Prasad
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
Shumpei Shiraishi
Php frameworks
Php frameworks
Anil Kumar Panigrahi
The Devil and HTML5
The Devil and HTML5
Myles Braithwaite
True Dreams Furniture
True Dreams Furniture
SimranGaur3
Make More Money With Advanced Custom Fields - WordCampYYC 2015
Make More Money With Advanced Custom Fields - WordCampYYC 2015
buildstudio
Grails resources
Grails resources
Colin Harrington
Summit2014 topic 0066 - 10 enhancements that require 10 lines of code
Summit2014 topic 0066 - 10 enhancements that require 10 lines of code
Angel Borroy López
2014 database - course 3 - PHP and MySQL
2014 database - course 3 - PHP and MySQL
Hung-yu Lin
Zend
Zend
Mohamed Ramadan
Jsp Notes
Jsp Notes
Rajiv Gupta
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
IT Event
Django
Django
Mohamed Ramadan
Drupal Javascript for developers
Drupal Javascript for developers
Dream Production AG
Django at the Disco
Django at the Disco
Richard Leland
Enjoy the vue.js
Enjoy the vue.js
TechExeter
Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)
Joao Lucas Santana
Weitere ähnliche Inhalte
Was ist angesagt?
Progressive Downloads and Rendering
Progressive Downloads and Rendering
Stoyan Stefanov
How to make a WordPress theme
How to make a WordPress theme
Hardeep Asrani
E2 appspresso hands on lab
E2 appspresso hands on lab
NAVER D2
Drupal as a web framework
Drupal as a web framework
Adam Kalsey
Presentation
Presentation
Manav Prasad
Jsp
Jsp
Manav Prasad
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
Shumpei Shiraishi
Php frameworks
Php frameworks
Anil Kumar Panigrahi
The Devil and HTML5
The Devil and HTML5
Myles Braithwaite
True Dreams Furniture
True Dreams Furniture
SimranGaur3
Make More Money With Advanced Custom Fields - WordCampYYC 2015
Make More Money With Advanced Custom Fields - WordCampYYC 2015
buildstudio
Grails resources
Grails resources
Colin Harrington
Summit2014 topic 0066 - 10 enhancements that require 10 lines of code
Summit2014 topic 0066 - 10 enhancements that require 10 lines of code
Angel Borroy López
2014 database - course 3 - PHP and MySQL
2014 database - course 3 - PHP and MySQL
Hung-yu Lin
Zend
Zend
Mohamed Ramadan
Jsp Notes
Jsp Notes
Rajiv Gupta
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
IT Event
Django
Django
Mohamed Ramadan
Drupal Javascript for developers
Drupal Javascript for developers
Dream Production AG
Django at the Disco
Django at the Disco
Richard Leland
Was ist angesagt?
(20)
Progressive Downloads and Rendering
Progressive Downloads and Rendering
How to make a WordPress theme
How to make a WordPress theme
E2 appspresso hands on lab
E2 appspresso hands on lab
Drupal as a web framework
Drupal as a web framework
Presentation
Presentation
Jsp
Jsp
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
Php frameworks
Php frameworks
The Devil and HTML5
The Devil and HTML5
True Dreams Furniture
True Dreams Furniture
Make More Money With Advanced Custom Fields - WordCampYYC 2015
Make More Money With Advanced Custom Fields - WordCampYYC 2015
Grails resources
Grails resources
Summit2014 topic 0066 - 10 enhancements that require 10 lines of code
Summit2014 topic 0066 - 10 enhancements that require 10 lines of code
2014 database - course 3 - PHP and MySQL
2014 database - course 3 - PHP and MySQL
Zend
Zend
Jsp Notes
Jsp Notes
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Django
Django
Drupal Javascript for developers
Drupal Javascript for developers
Django at the Disco
Django at the Disco
Ähnlich wie Build a React PWA with Material UI and Webpack
Enjoy the vue.js
Enjoy the vue.js
TechExeter
Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)
Joao Lucas Santana
WebAPI Odata Knockout
WebAPI Odata Knockout
Sudeep Mukherjee
Node.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash Course
Aaron Silverman
smoke1272528461
smoke1272528461
mxsmoketest
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
Rob Bontekoe
Resource registries plone conf 2014
Resource registries plone conf 2014
Ramon Navarro
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!
Eric Palakovich Carr
Resource Registries: Plone Conference 2014
Resource Registries: Plone Conference 2014
Rob Gietema
Responsive Design: Mehr als CSS
Responsive Design: Mehr als CSS
Walter Ebert
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
James Pearce
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
crokitta
Frfrfrf
Frfrfrf
Nelinho Pereira
CSS framework By Palash
CSS framework By Palash
PalashBajpai
Desenvolvimento web com jQuery Mobile
Desenvolvimento web com jQuery Mobile
Pablo Garrido
Bootstrap
Bootstrap
Sarvesh Kushwaha
The new static resources framework
The new static resources framework
marcplmer
Practica n° 7
Practica n° 7
rafobarrientos
Introduction to Html5
Introduction to Html5
www.netgains.org
JavaServer Pages
JavaServer Pages
profbnk
Ähnlich wie Build a React PWA with Material UI and Webpack
(20)
Enjoy the vue.js
Enjoy the vue.js
Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)
WebAPI Odata Knockout
WebAPI Odata Knockout
Node.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash Course
smoke1272528461
smoke1272528461
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
Resource registries plone conf 2014
Resource registries plone conf 2014
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!
Resource Registries: Plone Conference 2014
Resource Registries: Plone Conference 2014
Responsive Design: Mehr als CSS
Responsive Design: Mehr als CSS
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Frfrfrf
Frfrfrf
CSS framework By Palash
CSS framework By Palash
Desenvolvimento web com jQuery Mobile
Desenvolvimento web com jQuery Mobile
Bootstrap
Bootstrap
The new static resources framework
The new static resources framework
Practica n° 7
Practica n° 7
Introduction to Html5
Introduction to Html5
JavaServer Pages
JavaServer Pages
Mehr von Makoto Mori
20240227 完全に理解した LT 「mise いいよ mise」 / morishin
20240227 完全に理解した LT 「mise いいよ mise」 / morishin
Makoto Mori
エンジニアの気持ちを完全に理解してくれている Cypress Cloud
エンジニアの気持ちを完全に理解してくれている Cypress Cloud
Makoto Mori
20230228 React Tech Night TOKYO #3
20230228 React Tech Night TOKYO #3
Makoto Mori
20190623_SPAJAM2019_Sendai
20190623_SPAJAM2019_Sendai
Makoto Mori
20180908_OSSDevCamp2018
20180908_OSSDevCamp2018
Makoto Mori
20170417_Netadashi_KubeCon
20170417_Netadashi_KubeCon
Makoto Mori
20171004_CEATEC2017_DesignThinking
20171004_CEATEC2017_DesignThinking
Makoto Mori
Mehr von Makoto Mori
(7)
20240227 完全に理解した LT 「mise いいよ mise」 / morishin
20240227 完全に理解した LT 「mise いいよ mise」 / morishin
エンジニアの気持ちを完全に理解してくれている Cypress Cloud
エンジニアの気持ちを完全に理解してくれている Cypress Cloud
20230228 React Tech Night TOKYO #3
20230228 React Tech Night TOKYO #3
20190623_SPAJAM2019_Sendai
20190623_SPAJAM2019_Sendai
20180908_OSSDevCamp2018
20180908_OSSDevCamp2018
20170417_Netadashi_KubeCon
20170417_Netadashi_KubeCon
20171004_CEATEC2017_DesignThinking
20171004_CEATEC2017_DesignThinking
Kürzlich hochgeladen
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
ranjana rawat
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
SIVASHANKAR N
result management system report for college project
result management system report for college project
Tonystark477637
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Dr.Costas Sachpazis
Extrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
120cr0395
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
upamatechverse
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
SIVASHANKAR N
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
rknatarajan
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
Prabhanshu Chaturvedi
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Dr.Costas Sachpazis
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
rakeshbaidya232001
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
upamatechverse
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
Kamal Acharya
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
slot gacor bisa pakai pulsa
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls in Nagpur High Profile
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
pranjaldaimarysona
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
Asutosh Ranjan
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur High Profile
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
fenichawla
Kürzlich hochgeladen
(20)
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
result management system report for college project
result management system report for college project
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Extrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
Build a React PWA with Material UI and Webpack
1.
2.
3.
もりしん #スマブラSP #人工知能 #React #ドラゴンボール #PWA
#スタートアップ #仮想通貨 #Python
4.
5.
6.
7.
$ mkdir work work
8.
$ yarn init
[-y] work package.json
9.
$ yarn add
react react-dom work node_modules package.json yarn.lock
10.
$ mkdir public work node_modules public package.json yarn.lock
11.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta
name="viewport" content="width=device-width,initial-scale=1"> <title>Netadashi</title> </head> <body> <article id="root">Hello</article> </body> </html> work node_modules public index.html package.json yarn.lock
12.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta
name="viewport" content="width=device-width,initial-scale=1"> <title>Netadashi</title> </head> <body> <article id="root">Hello</article> </body> </html> work node_modules public index.html package.json yarn.lock
13.
$ mkdir src work node_modules public index.html package.json yarn.lock src
14.
import React from
'react'; import ReactDOM from 'react-dom'; ReactDOM.render( <h1>World</h1>, document.querySelector('#root') ); work node_modules public index.html package.json yarn.lock src index.jsx
15.
$ yarn add
webpack webpack-cli work node_modules public index.html package.json yarn.lock src index.jsx
16.
const path =
require('path'); module.exports = { entry: path.join(__dirname, 'src', 'index.jsx'), output: { filename: 'bundle.js', path: path.join(__dirname, 'public', 'assets', 'js') } }; work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
17.
$ webpack [--mode
development] ERROR in C:/Netadashi/work/src/index.jsx 5:2 Module parse failed: Unexpected token (5:2) You may need an appropriate loader to handle this file type. | | ReactDOM.render( > <h1>World</h1>, | document.querySelector('#root') | ); error An unexpected error occurred: "Command failed.… work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
18.
$ yarn add
@babel/core @babel/preset-react babel-loader work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
19.
const path =
require('path'); module.exports = { entry: path.join(__dirname, 'src', 'index.jsx'), output: { filename: 'bundle.js', path: path.join(__dirname, 'public', 'assets', 'js') }, module: { rules: [ { test: /¥.js[x]?$/, exclude: /node_modules/, use: { loader: 'babel-loader' } } ] } }; work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
20.
$ yarn add
webpack-dev-server work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
21.
... module: { rules: [ { test:
/¥.js[x]?$/, exclude: /node_modules/, use: { loader: 'babel-loader' } } ] }, devServer: { contentBase: path.join(__dirname, 'public') } }; work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
22.
... "dependencies": { "@babel/core": "^7.2.2", "@babel/preset-env":
"^7.2.3", "@babel/preset-react": "^7.0.0", "babel-loader": "^8.0.5", "react": "^16.7.0", "react-dom": "^16.7.0", "webpack": "^4.28.4", "webpack-cli": "^3.2.1", "webpack-dev-server": "^3.1.14" }, "scripts": { "dev": "webpack --mode development", "start": "webpack-dev-server --mode development" } } work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
23.
$ yarn [run]
dev [--watch] work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js
24.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta
name="viewport" content="width=device-width,initial-scale=1"> <title>Netadashi</title> </head> <body> <article id="root">Hello</article> <script src="/assets/js/bundle.js"></script> </body> </html> work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js
25.
$ yarn [run]
start
26.
$ yarn [run]
start
27.
Congratulations…?
28.
29.
$ yarn add
@material-ui/core work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js
30.
import React from
'react'; import ReactDOM from 'react-dom'; const App = () => { return ( <> <h1>World</h1> </> ); }; ReactDOM.render( <App />, document.querySelector('#root') ); work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js
31.
import React from
'react'; import ReactDOM from 'react-dom'; import { Button, Typography } from '@material-ui/core'; const App = () => { return ( <> <Typography variant="h6">Neta</Typography> <Button variant="contained" color="primary">Dashi</Button> </> ); }; ReactDOM.render( <App />, document.querySelector('#root') ); work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js
32.
$ mkdir css work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css
33.
body { margin: 0; } work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css master.css
34.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta
name="viewport" content="width=device-width,initial-scale=1"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <link rel="stylesheet" href="/assets/css/master.css"> <title>Netadashi</title> </head> <body> <article id="root">Loading...</article> <script src="/assets/js/bundle.js"></script> </body> </html> work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css master.css
35.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta
name="viewport" content="width=device-width,initial-scale=1"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <link rel="stylesheet" href="/assets/css/master.css"> <title>Netadashi</title> </head> <body> <article id="root">Loading...</article> <script src="/assets/js/bundle.js"></script> </body> </html> work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css master.css
36.
37.
38.
39.
40.
... const App =
() => { return ( <> <Typography variant="h6">Neta</Typography> <section style={{ background: 'url(https://source.unsplash.com/random/500x500) center / cover', height: '80vw', width: '80vw' }} /> <Button variant="contained" color="primary" onClick={() => { location.reload(); }} > Dashi </Button> </> ); }; ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css master.css
41.
... const App =
() => { return ( <> <Typography variant="h6">Neta</Typography> <section style={{ background: 'url(https://source.unsplash.com/random/500x500) center / cover', height: '80vw', width: '80vw' }} /> <Button variant="contained" color="primary" onClick={() => { location.reload(); }} > Dashi </Button> </> ); }; ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css master.css
42.
import React from
'react'; import ReactDOM from 'react-dom'; import { AppBar, Button, Toolbar, Typography } from '@material-ui/core'; const App = () => { return ( <> <AppBar position="static"> <Toolbar> <Typography variant="h6" color="inherit">Neta</Typography> </Toolbar> </AppBar> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css master.css
43.
import React from
'react'; import ReactDOM from 'react-dom'; import { AppBar, Button, Toolbar, Typography } from '@material-ui/core'; const App = () => { return ( <> <AppBar position="static"> <Toolbar> <Typography variant="h6" color="inherit">Neta</Typography> </Toolbar> </AppBar> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css master.css
44.
$ mkdir components work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components
45.
import React from
'react'; import { AppBar, Toolbar, Typography } from '@material-ui/core'; const Header = () => { return ( <> <AppBar position="static"> <Toolbar> <Typography variant="h6" color="inherit">Neta</Typography> </Toolbar> </AppBar> </> ); }; export default Header; work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
46.
... import { Button
} from '@material-ui/core'; import Header from './components/Header.jsx'; const App = () => { return ( <> <Header /> <section style={{ background: 'url(https:// source.unsplash.com/random/500x500) center / cover', height: '80vw', width: '80vw' }} /> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
47.
... import { Button,
Grid } from '@material-ui/core'; import Header from './components/Header.jsx'; const App = () => { return ( <> <Header /> <Grid container alignItems="center" justify="center"> <Grid style={{ padding: 24 }}> <section style={{ background: 'url(https://source.unsplash.com/random/500x500) center / cover', height: '80vw', width: '80vw', border: 'solid 3vw #fff', boxShadow: '0 1vw 3vw #999' }} /> </Grid> </Grid> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
48.
... import { Button,
Grid } from '@material-ui/core'; import Header from './components/Header.jsx'; const App = () => { return ( <> <Header /> <Grid container alignItems="center" justify="center"> <Grid style={{ padding: 24 }}> <section style={{ background: 'url(https://source.unsplash.com/random/500x500) center / cover', height: '80vw', width: '80vw', border: 'solid 3vw #fff', boxShadow: '0 1vw 3vw #999' }} /> </Grid> </Grid> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
49.
import React from
'react'; import { AppBar, Toolbar, Typography } from '@material-ui/core'; const Header = () => { return ( <> <AppBar position="static"> <Toolbar> <Typography variant="h6" color="inherit">Neta/Dash</Typography> </Toolbar> </AppBar> </> ); }; export default Header; work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
50.
... import { Fab,
Grid, Icon } from '@material-ui/core'; import Header from './components/Header.jsx'; const App = () => { return ( <> <Header /> <Grid container alignItems="center" justify="center"> ... </Grid> <section style={{ position: 'fixed', right: '6vw', bottom: '6vw' }}> <Fab color="secondary" onClick={() => { location.reload(); }}> <Icon fontSize="large">directions_run</Icon> </Fab> </section> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
51.
... import { Fab,
Grid, Icon } from '@material-ui/core'; import Header from './components/Header.jsx'; const App = () => { return ( <> <Header /> <Grid container alignItems="center" justify="center"> ... </Grid> <section style={{ position: 'fixed', right: '6vw', bottom: '6vw' }}> <Fab color="secondary" onClick={() => { location.reload(); }}> <Icon fontSize="large">directions_run</Icon> </Fab> </section> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
52.
$ yarn global
add now work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
53.
{ "name": "work", "version": "1.0.0", "main":
"index.js", "license": "MIT", "dependencies": { "@babel/core": "^7.2.2", "@babel/preset-react": "^7.0.0", "@material-ui/core": "^3.9.0", "babel-loader": "^8.0.5", "react": "^16.7.0", "react-dom": "^16.7.0", "webpack": "^4.28.4", "webpack-cli": "^3.2.1", "webpack-dev-server": "^3.1.14" }, "scripts": { "dev": "webpack --mode development", "build": "webpack --mode production", "start": "webpack-dev-server --mode development" } } work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
54.
$ yarn [run]
build work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
55.
$ now work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
56.
57.
58.
Jetzt herunterladen