CDN
Boot up
Build
Deploy
Stop
Boot up
Deliver
Cache
Stop
merge, build, deploy
getStaticPaths
getStaticProps
getServerSideProps
Time to First Byte
First Contentful Paint
Largest Contentful Paint
First Input Delay
Time to Interactive
Total Blocking Time
Cumulative Layout Shift
render time of the largest image or text block visible within the viewport.
time from when the user interacts with the page, to when browser is able to process the request
the total sum of all individual layout shifts for every one that occurs in the lifespan of the page
`reportWebVitals`
export function reportWebVitals(metric) {
switch (metric.name) {
case 'FCP':
// handle FCP results
break
case 'LCP':
// handle LCP results
break
case 'CLS':
// handle CLS results
break
case 'FID':
// handle FID results
break
case 'TTFB':
// handle TTFB results
break
default:
break
}
}
export function reportWebVitals(metric) {
switch (metric.name) {
case 'Next.js-hydration':
// handle hydration results
break
case 'Next.js-route-change-to-render':
// handle route-change to render results
break
case 'Next.js-render':
// handle render results
break
default:
break
}
}
type Metric = {
id: string
name: string
startTime: number
value: number
label: 'web-vital' | 'custom'
}
`revalidate` in `getStaticProps` is not fully supported
revalidate flag in getStaticProps is not fully supported
Styled-JSX
CSS Modules
TailwindCSS
CSS imports
PostCSS
CSS-in-JS
JIT Compiler
PostCSS
Design System
module.exports = {
purge: [],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}
yarn create next-app --typescript
git clone https://github.com/atilafassina/worknet.git