SlideShare a Scribd company logo
1 of 63
Download to read offline
The hero’s journey
in JavaScript frameworks
@ddprrt • fettblog.eu
Hero’s journey
Hero’s journey
Not the tour of heroes!
!
!
call to adventure
!
call to adventure
crossing the threshold
!
call to adventure
crossing the thresholdknown
unknown
!
call to adventure
crossing the threshold
abyss
known
unknown
!
call to adventure
crossing the threshold
abyss
the road of trials
known
unknown
!
call to adventure
crossing the threshold
metamorphosis
abyss
the road of trials
known
unknown
!
call to adventure
crossing the threshold
metamorphosis
the ultimate boon
abyss
the road of trials
known
unknown
!
call to adventure
crossing the threshold
metamorphosis
the ultimate boon
returning the boon
abyss
the road of trials
known
unknown
!
call to adventure
crossing the threshold
metamorphosis
the ultimate boon
returning the boon
abyss
the road of trials
known
unknown
It’s like learning a JavaScript framework!
!
call to adventure
crossing the threshold
metamorphosis
the ultimate boon
returning the boon
abyss
the road of trials
!
crossing the threshold
metamorphosis
the ultimate boon
returning the boon
abyss
the road of trials
starting a new project
!
metamorphosis
the ultimate boon
returning the boon
abyss
the road of trials
starting a new project
hello world
!
metamorphosis
the ultimate boon
returning the boon
abyss
starting a new project
hello world
googling the error message
!
metamorphosis
the ultimate boon
returning the boon
starting a new project
hello world
googling the error message
going
into
production
!
the ultimate boon
returning the boon
starting a new project
hello world
googling the error message
going
into
production
understanding the
technology
!
returning the boon
starting a new project
hello world
googling the error message
going
into
production
understanding the
technology
adding
framework to CV
!
starting a new project
hello world
googling the error message
going
into
production
understanding the
technology
adding
framework to CV
answering questions on
stack overflow
It’s a bumpy road ahead!
Three act structure
Three act structure
Act One Act Two Act Three
Three act structure
Beginning
Inciting
incident
Second
thoughts
Act One Act Two Act Three
Three act structure
Beginning
Inciting
incident
Second
thoughts
Act One Act Two Act Three
Obstacles
Obstacles
Three act structure
Beginning
Inciting
incident
Second
thoughts
Act One Act Two Act Three
Obstacles
Obstacles
Three act structure
Plot Twist!
Beginning
Inciting
incident
Second
thoughts
Act One Act Two Act Three
Obstacles
Obstacles
Three act structure
Climax
Plot Twist!
Beginning
Inciting
incident
Second
thoughts
Act One Act Two Act Three
Obstacles
Obstacles
Three act structure
Climax
Denouement
End
Plot Twist!
Beginning
Inciting
incident
Second
thoughts
Act One Act Two Act Three
Obstacles
Obstacles
Three act structure
Climax
Denouement
End
Plot Twist!
Beginning
Inciting
incident
Second
thoughts
Act One Act Two Act Three
Obstacles
Obstacles
Three act structure
Climax
Denouement
End
Plot Twist!
Beginning
Inciting
incident
Second
thoughts
Act One Act Two Act Three
Obstacles
Obstacles
Three act structure
Climax
Denouement
End
Plot Twist!
learning curve
Beginning
Inciting
incident
Second
thoughts
Act One Act Two Act Three
Obstacles
Obstacles
Three act structure
Climax
Denouement
End
Plot Twist!
learning curve
Beginning
Inciting
incident
Second
thoughts
Act One Act Two Act Three
Obstacles
Obstacles
Three act structure
Climax
Denouement
End
Plot Twist!
learning curve
Beginning
Inciting
incident
Second
thoughts
Act One Act Two Act Three
Obstacles
Obstacles
Three act structure
Climax
Denouement
End
Plot Twist!
learning curve
Beginning
Inciting
incident
Second
thoughts
Act One Act Two Act Three
Obstacles
Obstacles
Three act structure
Climax
Denouement
End
Plot Twist!
learning curve
Beginning
Inciting
incident
Second
thoughts
Act One Act Two Act Three
Obstacles
Obstacles
Three act structure
Climax
Denouement
End
Plot Twist!
learning curve
next.js
Act One: Setup
The Beginning
Inciting incident
Second thoughts
call to adventure
crossing the threshold
Act One: Setup
pages/index.js export default () => <h1>Hello World</h1>
package.json {
"name": "hello-world",
"scripts": {
"dev": "next",
},
"dependencies": {
"next": "latest",
"react": "^16.0.0",
"react-dom": "^16.0.0"
}
}
Act One: Setup
pages/index.js import Link from ‘next/link’
export default () =>
<>
<h1>Hello World</h1>
<Link href=‘/about’><a>About</a></Link>
</>
pages/about.js export default () =>
<>
<h1>Hello About</h1>
</>
Act One: Setup
Second thoughts? import Head from ‘next/head’
export default () =>
<>
<Head>
<title>A podcast about JavaScript</title>
</Head>
<h1>Hello World</h1>
</>
Act Two: Confrontation
Obstacles
Obstacles
Plot Twist
the road of trials
the abyss
Act Two: Confrontation
next.config.js const withTypescript =
require('@zeit/next-typescript')
const withCSS = require('@zeit/next-css')
const withMDX = require('@zeit/next-mdx')()
module.exports =
withTypescript()
Act Two: Confrontation
next.config.js const withTypescript =
require('@zeit/next-typescript')
const withCSS = require('@zeit/next-css')
const withMDX = require('@zeit/next-mdx')()
module.exports =
withCSS(withTypescript())
Act Two: Confrontation
next.config.js const withTypescript =
require('@zeit/next-typescript')
const withCSS = require('@zeit/next-css')
const withMDX = require('@zeit/next-mdx')()
module.exports =
withMDX(withCSS(withTypescript()))
Act Two: Confrontation
about.js import ArticleLayout
from '../components/ArticleLayout';
import About from '../articles/about.mdx';
import Head from 'next/head';
export default () => <ArticleLayout>
<Head>
<title>About ScriptCast</title>
</Head>
<About />
</ArticleLayout>;
Act Two: Confrontation The Abyss!
Act Two: Confrontation
server.js const express = require('express');
const next = require(‘next');
const app = next();
const handle = app.getRequestHandler();
The Abyss!
Act Two: Confrontation
server.js const express = require('express');
const next = require(‘next');
const app = next();
const handle = app.getRequestHandler();
app.prepare()
.then(() => {
const server = express();
server.get('/api', fetchRSS());
server.get('*', (req, res) => handle(req, res));
});
The Abyss!
Act Three: Resolution
Climax
Denouement
End
metamorphosis
the ultimate boon
returning the boon
Act Three: Resolution
import App, { Container } from 'next/app'
import React from ‘react';
export default class MyApp extends App {
render () {
const { Component, pageProps } = this.props;
return
<Container>
<Component {...pageProps} />
</Container>
}
}
_app.js
Act Three: Resolution
import App, { Container } from 'next/app'
import React from ‘react';
import Player from ‘../components/Player’
export default class MyApp extends App {
render () {
const { Component, pageProps } = this.props;
return
<Container>
<Component {...pageProps} />
<Player />
</Container>
}
}
_app.js
the ultimate boon!
returning the boon … to you!
incremental adoption
fin.

More Related Content

More from Stefan Baumgartner

More from Stefan Baumgartner (12)

WASM! WASI! WAGI! WAT?
WASM! WASI! WAGI! WAT?WASM! WASI! WAGI! WAT?
WASM! WASI! WAGI! WAT?
 
Serverless Rust
Serverless RustServerless Rust
Serverless Rust
 
What TypeScript taught me about JavaScript
What TypeScript taught me about JavaScriptWhat TypeScript taught me about JavaScript
What TypeScript taught me about JavaScript
 
Real-world component libraries at scale
Real-world component libraries at scaleReal-world component libraries at scale
Real-world component libraries at scale
 
Jamstack on Azure
Jamstack on AzureJamstack on Azure
Jamstack on Azure
 
TypeScript's Type System
TypeScript's Type SystemTypeScript's Type System
TypeScript's Type System
 
Sketchmine: Design Systems Tooling
Sketchmine: Design Systems ToolingSketchmine: Design Systems Tooling
Sketchmine: Design Systems Tooling
 
Automating UI development
Automating UI developmentAutomating UI development
Automating UI development
 
[German] Ab mit dem Kopf!
[German] Ab mit dem Kopf![German] Ab mit dem Kopf!
[German] Ab mit dem Kopf!
 
Advanced JavaScript build pipelines using Gulp.js
Advanced JavaScript build pipelines using Gulp.jsAdvanced JavaScript build pipelines using Gulp.js
Advanced JavaScript build pipelines using Gulp.js
 
Speed Index, explained!
Speed Index, explained!Speed Index, explained!
Speed Index, explained!
 
Plumbin Pipelines - A Gulp.js workshop
Plumbin Pipelines - A Gulp.js workshopPlumbin Pipelines - A Gulp.js workshop
Plumbin Pipelines - A Gulp.js workshop
 

Recently uploaded

Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 

Recently uploaded (20)

Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 

A hero's journey in JavaScript frameworks