Next.js vs UmiJS

Next.js and UmiJS are both open source static site generators written in JavaScript, but that's where the similarities end. See the full comparison of Next.js and UmiJS.

Property Next.js UmiJS
Language JavaScript JavaScript
Templates React React
License MIT MIT

Next.js benefits

Next.js is a minimalistic framework for server-rendered React applications as well as statically exported React apps.

Install

It's easy to install

npm install --save next react react-dom

Build

Add a build script

{
  "scripts": {
    "dev": "next",
    "build": "next build",
    "start": "next start"
  }
}

Run

After that, the file-system is the main API. Every .js file becomes a route that gets automatically processed and rendered.

Example

Creating a website only takes a minute. Examples

UmiJS benefits

Features

  • 📦 Out of box, with built-in support for react, react-router, jest, webpack, rollup, etc.
  • 🏈 Next.js like and full featured routing conventions, which also supports configured routing
  • 🎉 Plugin system, covering every lifecycle from source code to production
  • 🚀 High performance, including PWA support, route-level code splitting, etc.
  • 💈 Support for static export, Suitable for environments without server
  • 🚄 Fast dev startup, including dll support with config etc.
  • 🐠 Polyfill solution, add JS and CSS polyfill with targets config, lowest to IE9
  • 🍁 Support TypeScript, including d.ts definition and umi test
  • 🌴 Deep integration with dva, including duck directory support, automatic loading of model, code splitting, etc
  • ⛄️ Support MPA,based on umi-plugin-mpa

Install

Install tool

$ yarn global add umi # OR npm install -g umi

Build

Create a page

$ mkdir myapp && cd myapp
$ umi generate page index

Run

Start the development server

$ umi dev

Build and deploy

$ umi build

Examples