Comments (3)
@wyattjoh I guess it should be turned in a discussion but i don't get how we can then share data accross pages?
Let's say I have 1'000 pages sharing the same 10KB of common data that will be used by client components. How can I then share those data between those pages in order to:
1- avoid having the same common data stored in cache for those 1'000 pages
2- avoid a user session which visits or prefetch n of those pages will download n times those common data
3- avoid turning all the leafs of those pages to dynamic pages (using force-dynamic) in case those pages are purely static pages and should be built once and then served from the cache
4- avoid loading those common data client side
Thanks a lot!
from next.js.
In order to minimize costs associated with running serverless functions, the current implementation creates these RSC payloads statically, and therefore can't do the special logic around minimizing the RSC payload size. If these pages were instead set to render via:
export const dynamic = "force-dynamic"
Then you'd see the RSC payloads minimized. Work related to partial prerendering will help with some of this in the future, but it's a bit out.
from next.js.
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
from next.js.
Related Issues (20)
- Hot-reloading doesn't work for a newly created directory / files. HOT 1
- middleware request.cookies.has() fails when route is hit via Link HOT 2
- Cannot name a folder "index" inside the app directory.
- Using `revalidateTag()` inside dynamic route handler is unstable HOT 1
- Using `revalidateTag()` inside dynamic route handler is unstable HOT 2
- Cannot use import alias if route path starts with period
- Dynamic `import()` function usage behaves strangely, prevents server-only code HOT 1
- Client error with development message on PRODUCTION. HOT 1
- missing sourcemaps in app router and cannot debug with breakpoints HOT 1
- Docs: Learn Next.js Chapter 9 HOT 1
- next/link <Link> is not loading AMP page components from non-AMP page, I have to use <a> tag only then it renders AMP components which resets the router.
- Parent `loading` is not mounted when child's one is missing HOT 1
- Vercel deployment failed after commit changes to repository
- Error when using `experimental.workerThreads` and webpack config
- Time-based cache revalidation does not work when calling fetch with manually created Request object HOT 1
- Event listeners added multiple times on client-side HMR HOT 1
- Redirects don't work in production. The page times out HOT 5
- MQTT.JS example: the useEffect return cause client closure
- next/dynamic from external package causes hydration errors for combination of pages and app routers
- Licensing: 14.2.5 bundles MPL-licensed @vercel/og HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next.js.