GithubHelp home page GithubHelp logo

Recursive Data Fetching about after.js HOT 7 CLOSED

jaredpalmer avatar jaredpalmer commented on May 21, 2024 1
Recursive Data Fetching

from after.js.

Comments (7)

mjackson avatar mjackson commented on May 21, 2024 1

You basically just need to figure out which components you're planning to render, go fetch all their props, and then provide them to the components, right? I already did this back in earlier versions of RR. Would be happy to take a stab at it again here :D

from after.js.

jaredpalmer avatar jaredpalmer commented on May 21, 2024

Yeah the would be awesome.

from after.js.

jaredpalmer avatar jaredpalmer commented on May 21, 2024

On this note, have a gut feeling that the solution could be very useful if we wanted do a static export like gatsby (but obviously without the graphql complexity)

from after.js.

mohsen1 avatar mohsen1 commented on May 21, 2024

You basically just need to figure out which components you're planning to render

Rendering once to figure out what data needs to be fetched is something I did before. Not clean but it works. Only if React render could return a promise... 😬

from after.js.

tamagokun avatar tamagokun commented on May 21, 2024

I've used this in the past to accomplish data fetching for any component in a tree on the server: https://github.com/ctrlplusb/react-tree-walker

Worked out really well.

from after.js.

jaredpalmer avatar jaredpalmer commented on May 21, 2024

Yeah that could work.

@mjackson is react-router-config matchRoutes recursive? Should we be using that instead of the current implementation?

from after.js.

benkingcode avatar benkingcode commented on May 21, 2024

@jaredpalmer I actually just implemented this in a project I'm working on, I've published it as an npm package, might be of help!

https://github.com/dbbk/react-data-fetching-components

from after.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.