Next

next.js

Minimalistic framework for server-rendered React applications.

next.js framework helps with SSR of React applications and so far has:

  • Automatic transpilation and bundling (with webpack and babel)
  • Hot code reloading
  • Server rendering and indexing of ./pages
  • Static file serving. ./static/ is mapped to /static/

GET IT: npm instll --save next

Sample usage:

1
$ mkdir pages
1
2
3
//pages/index.js:
import React from 'react'
export default () => <div>Hello Next!</div>

Add a script to the package.json like:

1
2
3
4
5
{
  "scripts": {
    "start": "next"
  }
}

and run:

1
$ npm start

GIF FTW

Suggest a module

Comments