Giter Site home page Giter Site logo

Batched fetching about react-cosmos HOT 3 CLOSED

react-cosmos avatar react-cosmos commented on May 4, 2024
Batched fetching

from react-cosmos.

Comments (3)

skidding avatar skidding commented on May 4, 2024

Interesting idea. It would be even cooler if the API could support more than one request in a HTTP connection (something like django-superbulk).

But I'm not sure how you can trace all the components to be loaded all the way from the root component to the tree leaves. The component props can either come from an already fetched and parsed request or from the DOM, which is hardcoded inside the render method.

from react-cosmos.

skidding avatar skidding commented on May 4, 2024

A similar but reversed idea that I've been thinking about is for generateSnapshot to nest all the composed component props recursively. This has two benefits. 1. You can persist the entire state of a component including its children and it all will be loaded without the need of any request. 2. The cached history entry will also contain the entire nested props/state which will again render all the current hierarchy of components in a blink when going back in history.

from react-cosmos.

skidding avatar skidding commented on May 4, 2024

As honored as I am for having an issue opened by @petehunt, this is no longer relevant as the Cosmos project evolved into something that supports React components instead of dictating their design (besides the need to be encapsulated).

Pete–whatever you may be doing at the moment, if you ever get another chance to check out the new project mission feel free to check out the (simplified) README: https://github.com/skidding/cosmos/blob/master/README.md

from react-cosmos.

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.