Skip to content
Dashboard

Link to headingReact Made Easy and Simple

The "Hello World" of Next.js, as presented in our introductory post.

Link to headingProgrammatic API

const express = require('express')
const next = require('next')
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
app.prepare().then(() => {
const server = express()
server.get('/r/:subreddit', (req, res) => {
return app.render(req, res, '/b', {
...req.query,
subreddit: req.params.subreddit
})
})
server.get('*', (req, res) => {
handle(req, res)
})
server.listen(3000)
})

Implementing Reddit-style fancy URLs with Express and Next.js

Link to headingBring Your Own React

npm install --save next react react-dom

Link to headingComponent CSS Support

export default () => (
<div>
<p>hi there</p>
<style jsx>{`
p {
color: red;
}
`}</style>
</div>
)

The styles for `p` only apply to the JSX tags defined statically within the scope

Link to headingPre-fetching

export default () => (
<div>
<Link href="/next-page" prefetch>Go to the next page</Link>
</div>
)

Link to headingNext News

Navigating around Next News is snappy!
Navigating around Next News is snappy!

Link to headingMore Examples

Link to headingScalable HMR (Hot Module Replacement)

Link to headingA Smaller Build

Data for a basic site with the Next.js and React bundled
Data for a basic site with the Next.js and React bundled

Link to headingFully Extensible

{
"name': "my-next-app",
[]
"babel": {
"presets": ["next/babel"],
"plugins": [[
"transform-define",
"./env-config.js"
]]
}
}

`babel-plugin-transform-define` will let you to replace any JS expression mapped in `env-config.js` at compile time

Link to headingFeatured at ReactConf

Next.js: Universal React Made Easy and Simple - React Conf 2017

Link to headingThe Road to 3.0

Link to headingImproved HMR

Link to headingFaster Dev Compilation

Link to headingSeamless Support for Lazy import()

Link to headingReact Fiber

Link to headingStatic Exports

Link to headingReady for Production