惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
T
The Exploit Database - CXSecurity.com
I
Intezer
P
Privacy & Cybersecurity Law Blog
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
K
Kaspersky official blog
AWS News Blog
AWS News Blog
Schneier on Security
Schneier on Security
雷峰网
雷峰网
www.infosecurity-magazine.com
www.infosecurity-magazine.com
宝玉的分享
宝玉的分享
G
Google Developers Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Forbes - Security
Forbes - Security
T
The Blog of Author Tim Ferriss
S
Security @ Cisco Blogs
NISL@THU
NISL@THU
N
News and Events Feed by Topic
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
爱范儿
爱范儿
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
Blog — PlanetScale
Blog — PlanetScale
Help Net Security
Help Net Security
F
Full Disclosure
V
Vulnerabilities – Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
A
Arctic Wolf
D
Docker
T
Tailwind CSS Blog
L
LangChain Blog
The Last Watchdog
The Last Watchdog
美团技术团队
博客园 - Franky
H
Hacker News: Front Page
Stack Overflow Blog
Stack Overflow Blog
W
WeLiveSecurity
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recorded Future
Recorded Future
V
Visual Studio Blog
N
Netflix TechBlog - Medium
Hacker News: Ask HN
Hacker News: Ask HN
博客园 - 司徒正美
Cyberwarzone
Cyberwarzone
S
Schneier on Security
Know Your Adversary
Know Your Adversary

Vercel News

Vercel Open Source Program: Winter 2026 cohort How Notion Workers run untrusted code at scale with Vercel Sandbox How we run Vercel's CDN in front of Discourse From idea to secure checkout in minutes with Stripe Building Slack agents can be easy Scaling redirects to infinity on Vercel Advancing Python typing Gamma builds design-first agents with Vercel How Avalara turns pipe dreams into patent-pending with v0 Keeping community human while scaling with agents How OpenEvidence built a healthcare AI that physicians actually trust Security boundaries in agentic architectures Skills Night: 69,000+ ways agents are getting smarter Video Generation with AI Gateway We Ralph Wiggumed WebStreams to make them 10x faster How Stably ships AI testing agents in hours, not weeks How we built AEO tracking for coding agents Anyone can build agents, but it takes a platform to run them Introducing Geist Pixel The Vercel AI Accelerator is back with $6m in credits Making agent-friendly pages with content negotiation The Vercel OSS Bug Bounty program is now available Introducing the new v0 Run untrusted code with Vercel Sandbox, now generally available How Stripe built a game-changing app in a single flight with v0 How Sensay went from zero to product in six weeks AGENTS.md outperforms skills in our agent evals Agent skills explained: An FAQ Testing if "bash is all you need" AWS databases are now live on the Vercel Marketplace and v0 Use Perplexity Web Search with Vercel AI Gateway Introducing: React Best Practices Nick Bogaty joins Vercel as Chief Revenue Officer How Mux shipped durable video workflows with their @mux/ai SDK How to build agents with filesystems and bash How we made v0 an effective coding agent Stopping the slow death of internal tools Building AI-Generated Pixel Trading Cards with Vercel AI Gateway We removed 80% of our agent’s tools AI SDK 6 Our $1 million hacker challenge for React2Shell Cline now runs on Vercel AI Gateway How to prompt v0 Build smarter workflows with Notion and v0 Vercel launches partner certification Inside Workflow DevKit: How framework integrations work React2Shell Security Bulletin | Vercel Knowledge Base Billions of requests: Black Friday-Cyber Monday 2025 Investing in the Python ecosystem AWS Databases coming to the Vercel Marketplace How we built the v0 iOS app Workflow Builder: Build your own workflow automation platform Vercel Open Source Program: Fall 2025 cohort Self-driving infrastructure Vercel collaborates with Google for Gemini 3 Pro Preview launch Vercel: The anti-vendor-lock-in cloud How Nous Research used BotID to block automated abuse at scale How AI Gateway runs on Fluid compute What we learned building agents at Vercel Build and deploy data applications on Snowflake with v0 BotID Deep Analysis catches a sophisticated bot network in real-time Vercel achieves TISAX AL2 compliance to serve automotive partners Bun runtime on Vercel Functions David Totten Joins Vercel to Lead Global Field Engineering Vercel Ship AI 2025 recap You can just ship agents AI agents and services on the Vercel Marketplace Built-in durability: Introducing Workflow Development Kit Zero-config backends on Vercel AI Cloud Introducing Vercel Agent: Your new Vercel teammate Update regarding Vercel service disruption on October 20, 2025 Agents at work, a partnership with Salesforce and Slack Running Next.js in ChatGPT: How to Build ChatGPT Apps Talha Tariq joins Vercel as CTO of Security Just another (Black) Friday Server rendering benchmarks: Fluid Compute and Cloudflare Workers Towards the AI Cloud: Our Series F Collaborating with Anthropic on Claude Sonnet 4.5 to power intelligent coding agents Preventing the stampede: Request collapsing in the Vercel CDN BotID uncovers hidden SEO poisoning How we made global routing faster with Bloom filters What you need to know about vibe coding Scale to one: How Fluid solves cold starts Addressing security & quality issues with MCP tools - Vercel AI agents at scale: Rox’s Vercel-powered revenue operating system Agentic Infrastructure Zero Data Retention on AI Gateway Optimizing Vercel Sandbox snapshots How Waldium made a blog platform work for humans and AI alike How FLORA shipped a creative agent on Vercel's AI stack Agent responsibly Making Turborepo 96% faster with agents, sandboxes, and humans Unified reporting for all AI Gateway usage new.website joins forces with v0 SERHANT.'s playbook for rapid AI iteration Two startups at global scale without DevOps Chat SDK brings agents to your users 360 billion tokens, 3 million customers, 6 engineers Meet the 2026 Vercel AI Accelerator Cohort Build knowledge agents without embeddings
Next.js - Vercel – Vercel
2016-10-25 · via Vercel News

6 min read

We're very proud to open-source Next.js, a small framework for server-rendered universal JavaScript webapps, built on top of React, Webpack and Babel, which powers this very site!

To start using it, run inside a new directory with a package.json:

$ npm install next --save

$ mkdir pages

Populate pages/index.js:

import React from 'react'

export default () => <div>Hello world!</div>

Add a script to the package.json like this:

{

"scripts": {

"dev": "next"

}

}

and run:

$ npm run dev

This blog post will go into the philosophy and design decisions of the project.

To learn how to use Next.js instead, please refer to the README, where you can learn the entirety of the tool's capabilities in just a few minutes.

First we'll dive into the background of the project and then describe 6 basic principles:

  1. Zero setup. Use the filesystem as an API

  2. Only JavaScript. Everything is a function

  3. Automatic server rendering and code splitting

  4. Data fetching is up to the developer

  5. Anticipation is the key to performance

  6. Simple deployment

Link to headingBackground

For many years now, we have been pursuing a vision of universal JavaScript applications.

Node.js led the way, by enabling code sharing between client and server, broadening the contribution surface for many developers around the world.

Many attempts were made to make it practical to develop apps and websites on Node. Many template languages and frameworks came along... but the technical divide between frontend and backend remained.

If you for example picked Express and Jade, some HTML would be rendered by the server and then a different codebase (powered by jQuery or similar libraries) would take over.

That situation was really no better than, say, PHP's. In many ways, PHP was actually more suited for the "server rendering of HTML" job. Prior to async/await, it was difficult to query data services in JS. Catching and limiting errors to the scope of the request/response was also notoriously difficult.

Since then, however, notable conceptual changes have allowed us to bridge this gap. The most important of which is the introduction of the pure render function that returns the representation of the UI based on the available data at that point in time.

This model (popularized by React) is of significant importance, but that alone is not necessarily different from how most template systems work. The other critical concept is the component lifecycle.

Lifecycle hooks allow us to handle the continuation of some rendering that originated on the server. You can start with a static representation of data, subscribe to realtime updates from a server, and change it over time, for example. Or perhaps it just remains static.

Next.js is our take on how to bring this vision forward.

Link to headingZero setup. Use the filesystem as an API

Tools make certain assumptions about your projects' structure within the filesystem.

For example, we generally start a Node.js project by creating a new directory, placing a package.json inside, then installing modules into ./node_modules.

Next.js extends that structure by introducing a pages sub-directory where your top-level components live.

For example, you can populate pages/index.js which maps to the route / with:

import React from 'react'

export default () => <marquee>Hello world</marquee>

and then pages/about.js which maps to /about with:

import React from 'react'

export default () => <h1>About us</h1>

We believe this is a great default to get started with and allows for very quick exploration of a project. When more advanced routing is required, we'll allow developers to intercept the request and take control [#25].

All that's needed to start working on the project is to run:

$ npm run dev

No configuration unless it's needed. Automatic hot-code reloading, error reporting, source maps, transpilation for older browsers.

Link to headingOnly JavaScript. Everything is a function

Every route within Next.js is simply a ES6 module that exports a function or class that extends from React.Component.

The advantages of this approach over similar models is that your entire system remains highly composable and testable. For example, a component can be rendered directly, or be imported and rendered by another top-level component.

Components can also introduce changes to the <head> of the page:

import React from 'react'

import Head from 'next/head'

export default () => (

<div>

<Head>

<meta name="viewport" content="width=device-width, initial-scale=1" />

</Head>

<h1>Hi. I'm mobile-ready!</h1>

</div>

)

Furthermore, no wrappers or transformations are needed to make this system fully testable. Your test suite can simply import and shallow-render your routes.

We've also made the decision to embrace CSS-in-JS. We use the excellent glamor library which gives us the full unconstrained power of CSS without the need for CSS parsing and compilation:

import React from 'react'

import css from 'next/css'

export default () => <p className={style}>Hi there!</p>

const style = css({

color: 'red',

':hover': {

color: 'blue'

},

'@media (max-width: 500px)': {

color: 'rebeccapurple'

}

})

We think this model offers superior performance, composability and integration with the server-rendering pipeline.

Link to headingAutomatic server rendering and code splitting

Two tasks have so far been simultaneously very difficult and highly desirable:

  • Server rendering

  • Splitting your app's build into smaller bundles

With Next.js, every component inside pages/ gets server-rendered automatically and their scripts inlined.

When a component is loaded dynamically through <Link prefetch /> or the router, we fetch a JSON based representation of the page which likewise contains its scripts.

This means that a certain page could have an extensive list of imports:

import React from 'react'

import d3 from 'd3'

import jQuery from 'jquery'

… that don't affect the performance of the rest of the pages.

This detail is particularly powerful for large teams of people that collaborate on components with very different technical and business requirements. The performance penalties incurred in by a team or individual won't affect the rest of the organization's.

Link to headingData fetching is up to the developer

Server-rendering of static JSX is an important achievement, but real-world applications deal with dynamic data coming from different API calls and network requests.

Next.js makes a very important extension to the React's Component contract: getInitialProps.

A page that fetches some data would look as follows:

import React from 'react'

import 'isomorphic-fetch'

export default class extends React.Component {

static async getInitialProps () {

const res = await fetch('https://api.company.com/user/123')

const data = await res.json()

return { username: data.profile.username }

}

}

Our stance of what features we transpile (like async/await) can be summed up as: we target V8's capabilities. Since our goal is code-sharing between server and client, this gives us great performance when executing the code on Node and developing on Chrome or Brave, for example.

As you can see, the contract is very simple and unopinionated: getInitialProps must return a Promise that resolves to a `JavaScript` object, which then populates the component's props.

This makes Next.js play well with REST APIs, GraphQL, and even global-state management libraries Redux, an example of which you can find on our GitHub.

The same method allows for different data to be loaded depending on whether the component is server-rendered or dynamically rendered through client-side routing:

static async getInitialProps ({ res }) {

return res

? { userAgent: res.headers['user-agent'] }

: { userAgent: navigator.userAgent }

}

Link to headingAnticipation is the key to performance

We think that the pendulum of "fully server-rendered" swung abruptly to the extreme of "single page app" / "nothing server-rendered" thanks to the ability to give the user immediate feedback despite the network, provided the entire app has been loaded.

For www.vercel.com we've implemented a technique on top of Next.js that brings us the best of both worlds: every single <Link prefetch /> tag pre-fetches the component's JSON representation on the background, via a ServiceWorker.

If you navigate around, odds are that by the time you follow a link or trigger a route transition, the component has already been fetched.

Furthermore, since the data is fetched by a dedicated method (getInitialProps), we can pre-fetch aggressively without triggering unnecessary server load or data fetching. This is a substantial benefit over naive web 1.0 preload strategies.

Link to headingSimple deployment

We created Next.js because we believe universal isomorphic applications are a big part of the future of the web.

Ahead-of-time bundling and compilation (anticipation) is a critical part of effective and performant deployment.

All it takes to deploy a Next.js app is to run next build followed by next start.

When using , your package.json looks like this:

{

"name": "my-app",

"dependencies": {

"next": "*"

},

"scripts": {

"dev": "next",

"build": "next build",

"start": "next start"

}

}

Then you can simply invoke vercel to deploy.

In closing, this is our contribution to this very interesting problem. We think it strikes a good balance between flexibility and smart defaults, but it's certainly not a solution to every problem.

We look forward to, in the coming weeks, discussing and featuring other great approaches to accomplish this mission, like Vue.JSGatsbyEmber+Fastboot and many others.

If you're interested in contributing, please check out our issues and explore and debate 🚲 future directions.