Web & Full-Stack
324 verified issues
Facebook Engineers - Thank You For 2016
To all the Facebook Engineers working on open source, We at Reactiflux just wanted to take a moment to thank you for all your hard work in 2016. Your job isnβt easy. You have a million requests coming at you all the time from both your internal teams and the external community. Dan Abramov once compared managing issues and pull requests to juggling chainsaws on fire. Yes, we know all of you get paid really well to do open source full time, and that your work meets Facebookβs needs, but we think that you have gone above and beyond in the way that you have treated the community. The way that you guys respond to emails and Twitter mentions. The attention you give to each issue/PR. The time you give to different organizations doing podcasts and AMAs. The list goes on. Weβve personally seen an amazing humility in each of you, and itβs a pleasure to be around you wonderful people. Thank you for what you do and the excellence you put into all your efforts. Weβd like to invite the React community to reply to this thread with your own βthank youβ comments to the team at Facebook. Letβs show them how grateful we are! Feel free to include experiences with the team or just how the React ecosystem has helped you as a developer. Sincerely, On behalf of the Reactiflux community: @gabegreenberg @markerikson @KyleAMathews @taion @jquense @vcarl @benigeri @Phoenixmatrix
Consider re-licensing to AL v2.0, as RocksDB has just done
Hi there, The Apache Software Foundation Legal Affairs Committee [has announced][1] that the so-called 'Facebook BSD+Patents License' is no longer allowed to be used as a direct dependency in Apache projects. This has lead to a lot of upset and frustration in the Apache community, especially from projects requiring similarly-licensed code as direct dependencies - the chief of these being RocksDB. However, we (the Apache Software Foundation) have just received word that [RocksDB will be re-licensing their code under the dual Apache License v2.0 and GPL 2 licenses][2]. As a user of React.JS in an ASF top-level project (Apache CouchDB), please consider re-licensing React.JS under similar terms. Otherwise, many ASF projects such as our own will have to stop relying on and building with React. A previous bug (#9760) suggested I mention @lacker in this issue when asking licensing questions, so I'm doing so. Thank you kindly for your consideration. [1]: https://issues.apache.org/jira/browse/LEGAL-303?focusedCommentId=16088663&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16088663 [2]: https://issues.apache.org/jira/browse/LEGAL-303?focusedCommentId=16088730&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16088730
useCallback() invalidates too often in practice
This is related to https://github.com/facebook/react/issues/14092, https://github.com/facebook/react/issues/14066, https://github.com/reactjs/rfcs/issues/83, and some other issues. The problem is that we often want to avoid invalidating a callback (e.g. to preserve shallow equality below or to avoid re-subscriptions in the effects). But if it depends on props or state, it's likely it'll invalidate too often. See https://github.com/facebook/react/issues/14092#issuecomment-435907249 for current workarounds. `useReducer` doesn't suffer from this because the reducer is evaluated directly in the render phase. @sebmarkbage had an idea about giving `useCallback` similar semantics but it'll likely require complex implementation work. Seems like we'd have to do _something_ like this though. I'm filing this just to acknowledge the issue exists, and to track further work on this.
[NEXT-1147] Scroll position is reset when search params are updated
Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information [code block] Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/modest-gould-h4nlvd?file=%2Fapp%2Fpage.tsx&selection=%5B%7B%22endColumn%22%3A1%2C%22endLineNumber%22%3A7%2C%22startColumn%22%3A1%2C%22startLineNumber%22%3A7%7D%5D To Reproduce Click the counter to update client state. Scroll a little. Click the second button to update search params. The client state is preserved, but the scroll position is lost. Describe the Bug Context In Next <= 13.2.4, updating search params was working as intended : client state was kept, and scroll position was kept too. In Next 13.2.5, a regression made the client components unmount and remount when search params were updated. @feedthejim fixed that unmounting in https://github.com/vercel/next.js/pull/49047 (it's testable on `13.3.5-canary.2`), but there is still an issue now: scroll position is lost on search params updates. Problem: persisting state in search params is very important with the App router - that's a clean way for client components to request updated data from the RSC. Reproduction Codesandbox Here's a codesandbox reproducing the bug: https://codesandbox.io/p/sandbox/modest-gould-h4nlvd?file=%2Fapp%2Fpage.tsx&selection=%5B%7B%22endColumn%22%3A1%2C%22endLineNumber%22%3A7%2C%22startColumn%22%3A1%2C%22startLineNumber%22%3A7%7D%5D In video https://user-
Provide more ways to bail out inside Hooks
There's a few separate issues but I wanted to file an issue to track them in general: `useState` doesn't offer a way to bail out of rendering once an update is being processed. This gets a bit weird because we actually process updates during the rendering phase. So we're already rendering. But we could offer a way to bail on children. Edit: we now _do_ bail out on rendering children if the next state is identical. `useContext` doesn't let you subscribe to a part of the context value (or some memoized selector) without fully re-rendering. Edit: see https://github.com/facebook/react/issues/15156#issuecomment-474590693 for solutions to this.
[NEXT-1192] Failed to find font override - next/font/google
Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information [code block] Which area(s) of Next.js are affected? (leave empty if unsure) Font optimization (@next/font) Link to the code that reproduces this issue https://github.com/maxencerb/next-font-bug To Reproduce [code block] [code block] Describe the Bug Output Output works as expected Console Output [code block] Explaination All fallback font metrics from google are loaded from `next/font/google/get-fallback-font-override-metrics.ts` where we can see the following method and doc : [code block] So I think there might be a fix but I don't really know how to implement it. I tried looking at the local font optimization code. Maybe someone can either find the solution to calculate the values with fontkit or at least update the json file under `next/src/server/google-font-metrics.json` and tell how to find those values. Expected Behavior Find the font fallback for any google font Which browser are you using? (if relevant) _No response_ How are you deploying your application? (if relevant) _No response_ <sub>NEXT-1192</sub>
Tree shaking doesn't work with Typescript barrel files
Bug report I originally raised this as a discussion, but now I think it's a bug. Describe the bug When using a barrel file to re-export components from a single location, tree-shaking does not function correctly. To Reproduce I'm using Next 9.3.6 and I've arranged my components like: [code block] Each component file exports a single component, like this: [code block] index.ts is a barrel file that re-exports from each individual component file: [code block] I then use a couple of components in _app.tsx like: [code block] There's about 100 components defined, and only a couple are used in _app.tsx. But when I analyze the bundle I have a very large chunk, shared by all pages, and it contains all my components, resulting in an inflated app page size: <img width="748" alt="Screenshot 2020-05-06 09 35 32" src="https://user-images.githubusercontent.com/425787/81183292-f8bbdf00-8f7c-11ea-91c9-4b95adff907a.png"> I use a similar import strategy within pages, and every one of them appears to contain every component. my tsconfig.json is: [code block] and I'm using next's native support for the baseUrl field. I haven't changed the module or the target. When I change the _app.tsx imports to: [code block] the common bundle and app page size drops dramatically, as I would expect it to: <img width="751" alt="Screenshot 2020-05-06 09 34 21" src="https://user-images.githubusercontent.com/425787/81183384-1be68e80-8f7d-11ea-9aed-e32a1d871ab9.png"> Expected behavior The a
Facebook Engineers - Thank You For 2017
To all the Facebook Engineers working on open source, Like last year, we at Reactiflux just wanted to take a moment to thank you for all your hard work in 2017. Itβs been another big year! After much anticipation React 16 was released in September, React Native has moved from v0.41 to v0.51 fixing countless bugs and adding new features, Jest has over 20 releases this year, Yarn 1.0 and Relay Modern were released, new engineers have joined (hey @calebmer, @TheSavior, @axemclion) and some have moved on (weβll miss you @mkonicek), and that is just a tiny snapshot of 2017. Talking with some of you, I know that the dealing with the licensing issues this year was incredibly difficult and frustrating yet you all handled the situation in such a mature and humble manner all while continuing to iterate and innovate. Thank you! We are so happy that you can continue focusing on the work at hand, especially now that this chapter is finally closed. Guillermo Rauch recently tweeted, βAs 2017 wraps up I believe more than ever that React is such a good idea that we will spend the rest of the decade continuing to explore its implications and applications.β We echo this sentiment and as 2017 wraps up, we also believe more than ever that you all embody the spirit of open source with such humility, servant leadership, and true focus on community driven progress that it continues to astound us. We thank you that these qualities are at the heart of our community. We thank you for all the time y
Scroll restoration happens too early before the page gets rendered after hitting browser back button
- [x] I have searched the issues of this repository and believe that this is not a duplicate. After transiting from one page to another page via next `<Link />`, if user clicks the back button and the previous page has `getInitialProps` method that takes some time to finish, the scroll position of the previous will be restored before the previous pages gets rendered. Demo source code can be found here After clicking back button, the "go back" text should still be visible (not scroll down to previous position) until the previous page gets rendered
[NEXT-684] Fast-refresh for CSS files is not working in Firefox
Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information [code block] What browser are you using? (if relevant) _No response_ How are you deploying your application? (if relevant) _No response_ Describe the Bug So I just started a new next.js app using the `v13.0.5` with the experimental `app` folder. I noticed that CSS changes are not correctly updated in the browser. The browser is notified of the change, but the styles are not applied - if I manually refresh the browser I can see the correct styles. I also tried the canary version and the error still exists. Moving to `v13.0.4` seems to work fine. And I also tried with Tailwind following the beta documentation and also it doesn't work. Expected Behavior Updating styles should fast refresh and update the page with the new styles. Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster https://stackblitz.com/edit/vercel-next-js-viybne?file=app/global.css To Reproduce Open the `global.css` file, change the colors and save the file. You can see it working with the 13.0.4: https://stackblitz.com/edit/vercel-next-js-6sncvk?file=app/global.css <sub>NEXT-684</sub>
Add fragment API to allow returning multiple components from render
--- Note from maintainers: We know this is an issue and we know exactly what set of problem can be solved. We want this too but it is a _hard problem_ with our current architecture. Additional comments expressing desire for this feature are not helpful. Feel free to subscribe to the issue (there's button in the right hand column) but do not comment unless you are adding value to the discussion. "Me too" and "+1" are not valuable, nor are use cases that have already been written in the comments (e.g., we know that you can't put `<tr>` or `<dd>` elements with a `<div>`). --- Consider the following: [code block] If you remove the `<div></div>` in the `map`, you get the following error: _Adjacent XJS elements must be wrapped in an enclosing tag_ it isn't till I re-add the surrounding, and rather pointless, divs that it compiles with out issue. I am running 0.11.1 Is this being addressed? It adds extra, and again - IMO - useless and pointless html to the page, that while harming nothing - looks messy and unprofessional. Maybe I am just doing something wrong, please enlighten me if I am.
[Next 9] out of memory when building the app
Bug report Describe the bug Moving an application from Next 8 to Next 9. When I run `next build` the process goes out of memory and it cannot build the application. FYI, it's an application with 20 routes more or less. To Reproduce That's hard to reproduce as I don't have any idea what went wrong. Next 8 compiles without issue but not Next9. Here's the stack trace. If you know how to get a more descriptive output, let me know and I will provide: [code block] Expected behavior It should build Screenshots If applicable, add screenshots to help explain your problem. System information - OS: macOS - Node: 10.13.0 (it will have to work with node 8.X too) - Version of Next.js: 9.0.1 Additional context Add any other context about the problem here.
Static Generation / SSG Improvements
Summary Allow Next.js to become fully hybrid by providing methods to do both static generation and server-side rendering on a per-page basis. - Two new per-page data fetching methods - `getStaticProps` - Opt-in to static generation (SSG) at `next build` time. - `getServerSideProps` - Opt-in to server-side rendering (SSR) which renders on-demand. - A new method for statically generating (SSG) a set of routes from dynamic sources - `getStaticPaths` - Return list of parameters for dynamic routes to do static generation (SSG) This RFC exclusively discusses API additions. All new functionality is completely backwards compatible and can be incrementally adopted. This RFC introduces no deprecations. Background When building websites or web applications you generally have to choose between 2 strategies: Static generation (SSG) or server-side rendering (SSR). Next.js instead lets you build hybrid applications that allow you to choose per-page which strategy is used. Starting with Next.js 9, pages without `getInitialProps` get statically optimized and output as `.html` files upon `next build`. However, you might want to do data fetching while generating static pages for your specific use case. For example, to statically generate marketing pages from a CMS or a blog section of the site. Using `getInitialProps` would opt you into SSR in that case. Next.js currently has a `next export` command, that makes the application fully SSG, losing the hybrid nature of Next.js. If
[NEXT-1187] Link navigation with loading.tsx is not instant for dynamic pages
Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103 Binaries: Node: 18.12.1 npm: 8.19.2 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.0.6-canary.2 eslint-config-next: 13.0.5 react: 18.2.0 react-dom: 18.2.0 Which area of Next.js is affected? (leave empty if unsure) App directory (appDir: true), Routing (next/router, next/navigation, next/link) Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster https://github.com/tonypizzicato/next-13-loading To Reproduce - pull the repo - run `yarn install && yarn dev` - open `localhost:3000` in the browser - go to the "Careers" page - reload the page - set some throttling in devtools - click different pages in the menu - notice that "Careers" page loading state and route change are done instantly but with some delay for other pages Describe the Bug When you have a dynamic page with `loading.tsx` the route change and showing the loading animation are instant only for the page, which was freshly loaded. For other dynamic pages it hits the server first, then shows the loading state <img width="193" alt="Screenshot 2022-11-29 at 23 19 38" src="https://user-images.
[NEXT-841] FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
What version of Next.js are you using? 12.0.7 What version of Node.js are you using? 16.6.2 What browser are you using? Chrome / safari What operating system are you using? Mac os How are you deploying your application? other Describe the Bug We have a monorepo with nx wherein we are using next for ssr We have been on next 11 and wanted to move to the next 12 with swc On doing so and making the neccessary changes, our app crashes with We have tried adding more memory but we feel that the issue lies elsewhere [code block] Expected Behavior Should work To Reproduce - upgrade to next 12.0.7 / 12.0.4 and try running the dev server <sub>NEXT-841</sub>
CSS module styling is removed too early on route changes
Bug report Describe the bug CSS module styling is removed immediately after clicking a `next/link`, instead of after the DOM is removed on production builds. This causes the components to have no styling at all during a page transition. This issue does not happen on dev mode. I believe this is a bug with CSS modules specifically because components styled with `styled-jsx` don't have this problem. Really would love to be able to use Sass via CSS modules here instead of re-writing the entire app I'm working on using `styled-jsx`. If Sass modules can't work in this scenario, I think I would be forced to use `styled-jsx`, which is not my preferred method of styling my components for this project. To Reproduce I have created repos, and deployed these repos to demonstrate the problem using framer-motion for page transitions. If you were to pull these repos and run them locally using `npm run dev`, you will see that the flash of unstyled content does not happen on any one of them in dev mode. However, on their deployed sites, you can see the flash of unstyled content with CSS modules and Sass modules. styled-jsx Behavior: correct, no flash of unstyled content Deployed site on Vercel Repo CSS modules Behavior: buggy, there is a flash of unstyled content immediately after clicking the link Deployed site on Vercel Repo Sass via CSS modules (additional) Behavior: buggy, there is a flash of unstyled content immediately after clicking the link (same as CSS modules) Deployed
How to catch and handle errors to report logs on server side
Hi, I'm in the situation where we want to sent errors, both on server and client side, to Sentry tool. Our app uses Express as a custom server. Basically we create an express app, apply some middlewares but delegate all the real job to the next.js handle: [code block] With this approach next.js takes control over the rendering process and any error is catch by next.js and the only way I have to process it is overriding the `_error.js` page file. Within that `_error.js` file I need a universal way to report errors to Sentry. Currently there are two libraries (`raven` for node and `raven-js` por javascript). The proble is I can't import both of them because `raven` works for SSR but fails when webpack builds the bundle, and also `raven-js` fails due XMLHTTPRequest dependency too. Is there a way I can be notified for next.js error on server side?
Next.js API routes (and pages) should support reading files
Feature request Is your feature request related to a problem? Please describe. It's currently not possible to read files from API routes or pages. Describe the solution you'd like I want to be able to call `fs.readFile` with a `__dirname` path and have it "just work". This should work in Development and Production mode. Describe alternatives you've considered This may need to integrate with `@zeit/webpack-asset-relocator-loader` in some capacity. This plugin handles these types of requires. However, it's not a necessity. I'd be OK with something that _only_ works with `__dirname` and `__filename` (no relative or cwd-based paths). Additional context Example: [code block] > Note: I know you can cheat the above example βοΈ with `require`, but that's not the point. π
Next 9.5.1 out of memory after some hot reloads
Bug report Describe the bug Since updating to 9.5.x (from 9.4.x), i get an out of memory error after 10 something hot reloads: `FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory` it did rarely happen in 9.4.1, but it happens very consistantly in 9.5.x To Reproduce thats probably tricky. it happens on big projects and might be related to some bug in the hot reload / rebuild. Maybe it happens when there are some import circles? Expected behavior nextjs should not go out-of-memory System information - OS:macOS - Browser: chrome - Version of Next.js: 9.5.1 - Version of Node.js: 12.13.1 Additional information we are using a custom server with typescript
Hot reload not working at latest version of Next.js
Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information [code block] Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ Link to the code that reproduces this issue or a replay of the bug - To Reproduce 1. npx create-next-app@latest (next-tw) 2. yarn install 3. yarn dev Describe the Bug [code block] Expected Behavior Hot reload should work Which browser are you using? (if relevant) _No response_ How are you deploying your application? (if relevant) _No response_
Top-level app component and animated route transitions
Having animated route transitions would be nice, as this is one of the many benefits through client-side routing. Doing so should be left up to the user in my opinion (some people prefer CSS transitions over more fine-grained control with `react-motion` etc). As I understand it, one would need to modify the top-level App component. The client entry file seems to look for a globally assigned `__NEXT_DATA__.app` variable but I can't find any documentation on that.
Invalid hook call in 9.0.6
Bug report Describe the bug When you use react a component residing outside the main Next.js project folder which uses hooks. You end up getting `Invalid hook call` error and the application breaks. Components without hooks work as expected. The bug appears in all versions `>9.0.5` when you change the webpack config so that files outside the main folder are transpiled. Itβs working fine in `<=9.0.5` To Reproduce Check out the repro at https://github.com/baldurh/next-9.0.6-bug-repro Expected behavior The code should not break when using files outside the project folder. System information - OS: N/A - Browser: N/A - Version of Next.js: `>=9.0.6` Additional context I know this is probably not a common use of Next.js but in our project weβre using a monorepo and have a shared folder with components used by multiple applications. It would be nice to get this working again. If someone finds an alternative config we could use Iβd also be happy to do that π
[Bug] next/link is not calling the server for subsequent navigations on dynamic routes
Describe the feature you'd like to request In the documentation it is said that the conditions for hard navigation are : - when navigating between dynamic segments - When navigating between two different group layouts (ex: from `(groupA)/layout` to `(groupB)/layout` ) I'd like to suggest also adding hard navigation for segments marked with `dynamic='force-dynamic'` or when using dynamic functions and even when using fetch with `cache: 'no-store'`. In the docs you said that using these configurations is like using `getServerSideProps()` in the pages directory, but it does not behave the same between navigations which is quite confusing. Use cases for this feature could be these : - this app that only store pokemon data in cookies (Live here and source here) - this simple case for an app that generate a random number each time : ckblitz.com/edit/nextjs-sxijav?file=package.json,app%2Fnested%2Fpage.tsx Describe the solution you'd like The solution i propose is to consider hard navigation for these cases : - When navigating to a page marked with `dynamic='force-dynamic'`, next should always do a hard navigation - When navigating to a page using dynamic functions `headers()` and `cookies()`, next should always do a hard navigation - When navigating to a page using `fetch` with `cache: 'no-store'`, next should always do a hard navigation, or at least next should always refetch the data - When navigating to a page using either `fetch` with `next: { revalidate: n_seconds
React 16 RC
The third React 16 RC is now available for public testing. π Installation Instructions The RC has been published to NPM with the tag "next". Regular NPM installs will continue to use the 15.6 release. To install the RC use: [code block] Or: [code block] What Does React 16 Mean for You? React 16 is the first release that ships with a rewrite of the React core (previously codenamed βFiberβ). This rewrite had a few goals: Remove old internal abstractions that didnβt age well and hindered internal changes. Let us ship some of the most requested features like returning arrays from render, recovering from component errors, and readable component stack traces for every error. Enable us to start experimenting with asynchronous rendering of components for better perceived performance. This initial React 16.0 release is mostly focused on compatibility with existing apps. It does not enable asynchronous rendering yet. We will introduce an opt-in to the async mode later during React 16.x. We donβt expect React 16.0 to make your apps significantly faster or slower, but weβd love to know if you see improvements or regressions. JavaScript Environment Requirements React 16 depends on the collection types Map and Set. If you support older browsers and devices which may not yet provide these natively (eg <IE11), consider including a global polyfill in your bundled application, such as core-js or babel-polyfill. A polyfilled environment for React 16 using core-js to support olde
[NEXT-1308] Css is imported multiple times and out of order in /app dir
Verify canary release [X] I verified that the issue exists in the latest Next.js canary release Provide environment information [code block] Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) Link to the code that reproduces this issue or a replay of the bug https://github.com/ssijak/next-css-issue-not-working-simple To Reproduce Just start the app and check the styling on the buttons. Styles are imported multiple times wherever `Button` was used (page and layout) and order is also not deterministic, so it can be imported in different order on different app runs. This is another/same simple repro difference is just that it uses turbo and transpiles the UI lib, I started with that but figured that the issue is happening without it too https://github.com/ssijak/next-css-issue-not-working Describe the Bug \-Same styles are imported multiple times \-Order of imports is not deterministic Screenshot: https://share.cleanshot.com/nq35j7vh Expected Behavior Same styles should be imported once. Starting the app multiple times should not produce different results (ordering of CSS, impacting specificity) Which browser are you using? (if relevant) No response How are you deploying your application? (if relevant) No response* <sub>From SyncLinear.com | NEXT-1308</sub>
next-lint Doesn't Support ESLint 9
Link to the code that reproduces this issue https://codesandbox.io/p/devbox/vigilant-pine-6wmz8y To Reproduce 1. Add `next lint` script to package.json per https://nextjs.org/docs/app/building-your-application/configuring/eslint 2. Add `.eslintrc.json` to project per https://nextjs.org/docs/app/building-your-application/configuring/eslint [code block] 3. Run lint and get an error [code block] Current vs. Expected behavior Expected lint to run successfully, but it failed with errors. Provide environment information [code block] Which area(s) are affected? (Select all that apply) ESLint (eslint-config-next) Which stage(s) are affected? (Select all that apply) next dev (local), next build (local), next start (local) Additional context It looks like this is coming from https://github.com/vercel/next.js/blob/canary/packages/next/src/cli/next-lint.ts. This needs to be changed to support ESLint 9's flat config https://eslint.org/docs/latest/use/migrate-to-9.0.0#flat-config. The migration guide is at https://eslint.org/docs/latest/use/configure/migration-guide <sub>NEXT-3112</sub>
Use with React Router 4
Is it possible to use next.js with the new react router v4?
Verify CSS import ordering
A user on twitter reported that Next.js may not order CSS imports from JS correctly. We need to investigate and fix this! https://twitter.com/samselikoff/status/1299032241100787712 <sub>NEXT-1350</sub>
Custom Cache-Control response header for `/_next/image`
Bug report Describe the bug When requesting `/_next/image(.)`, I'm getting this Response header: [code block] And it's fine... What's not fine is that I'm getting the same exact Response headers even when I use custom headers in `next.config.js`, i.e.: [code block] To Reproduce Try this `next.config.js` above, with an image that uses common `<img>` tag like this: [code block] And another tag that uses the new `next/image` component, with the same or whatever image url, for example: [code block] And try requesting those images in the browser, and look into `Devtools -> Network` tab, the Response headers, and see that for common `<img>` tag it's actually changed, whereas for new `<Image>` component it is not. Expected behavior For `/_next/image(.)` urls, I expected to see Headers that I setup, i.e. `Cache-Control: public, max-age=180, s-maxage=180, stale-while-revalidate=180`. Screenshots Common `<img>`: New `<Image>`: System information - OS: not applicable / any - Browser (if applies): not applicable / any - Version of Next.js: 10.0.3 - Version of Node.js: 12.18.0 - Deployment: both `next start` on development machine, and actual Vercel deployment (screenshots demonstrate the case with local machine, but I've confirmed that the same is happening on a Vercel deployment) Additional context Originally I created an issue using "Feature request" template, and it got translated into "Idea discussion": https://github.com/vercel/next.js/discussions/19896 (how to d
React 16 Umbrella βοΈ (and 15.5)
This list might change, just putting it out there as the first draft. Posting these together since they're related, and we don't plan more 15.x releases after 15.5 anyway. To put these changes in context, we have a few goals: (Click to show) <details> For the past several months, we have been working on a rewrite of React codenamed βFiberβ. Initially, it wonβt affect public API, but it brings several new features (like https://github.com/facebook/react/issues/2127 and https://github.com/facebook/react/issues/2461). Fiber gives us a solid foundation to improve React core in numerous ways. Weβll be talking more about it soon, and we intend to ship it with React 16 by default. To reduce the bundle size, we need to remove the APIs that we don't recommend, such as `createClass` and `React.DOM.` helpers. We intend to warn once about their usage so that you can start removing dependencies on them. They will still be available as separate packages, but we will exclude them from the default build of React 16. We would like to have more control over the bundles so that we can better optimize them. This is why we are considering switching to flat bundles (and thus removing access to React internals in `react/lib/` and `react-dom/lib/`) in React 16. This will also mean faster compile times by default for users of Webpack and other bundlers, and faster server-side rendering performance. </details> Hereβs a speculative list of changes we think of doing in these releases: Past