Code Monkey home page Code Monkey logo

Comments (3)

gkielwasser avatar gkielwasser commented on August 24, 2024 1

@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.

wyattjoh avatar wyattjoh commented on August 24, 2024

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.

github-actions avatar github-actions commented on August 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.