GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing vercel.com — Next.js 4: React 16 and styled-jsx 2 We are happy to introduce Next.js 4, which features support for React 16 and introduces a major upgrade for the default styling engine styled-jsx with support for dynamic styles. Major performance improvements are introduced: SSR with Next.js 4 is 2.6x faster and style initialization is 20% faster. According to CSS-in-JS benchmarks, Next.js styles are now the fastest of any library. Next.js 4 is the result of the work of 29 contributors, the highest of any release yet! Check out the changes below. Copy link to headingReact 16React 16 introduces numerous improvements, which you can benefit from right away by just bumping your dependencies: With Next.js 3.0 we get about 105 requests per second on one of our model pages: ![]() and 272 requests per second with Next.js 4 and React 16 (a 2.6x improvement!) ![]() This brings React to similar levels of server-rendering performance as those we’ve observed when using Next.js in conjunction with preact. Copy link to headingStyled-jsx 2styled-jsx is a babel plugin to add support for styles inside React components. This effectively gives you the ability to have single file components with scoped and isolated CSS: CSS can be embedded alongside your JSX. It just works! Until today, there was support for embedding constants inside your styles, helpful for all sorts of configuration that applies to your CSS: In this case, COLOR is a constant, which is supported in 1.x As of styled-jsx 2, shipping with Next.js 4, you can now embed variables and expressions from within the scope, which can come from component props or state. In this case, color is a React prop and can change over time! This has the effect of reducing the need for inline styles in combination with static styles, which can create some confusion when reading component code. It also improves styled-jsx for use cases like animation and theming. styled-jsx 2 packs significant performance improvements. When used with static styles, it’s the fastest way to use styles in your application. When using dynamic styles, it’s among the fastest (and only getting faster in the future!) Copy link to headingFull Release NotesMinor changes
Patches
Copy link to headingConclusionWith nearly 18,000 stars in the 10 months since the initial Next.js release, we are humbled by the amazing growth and reception the Next.js project has seen. Next.js is now being used by companies of all size: from Fortune 50 enterprises, to design studios and startups and individuals all over the world. Moving forward, we plan on continuing to deliver frequent releases that improve your development experience and ability to extend Next.js to fit an ever-growing range of applications. Come Join Us! |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |