Comments (7)
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.
Yeah the would be awesome.
from after.js.
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.
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.
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.
Yeah that could work.
@mjackson is react-router-config
matchRoutes
recursive? Should we be using that instead of the current implementation?
from after.js.
@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)
- Error on using transitionBehavior="instant" HOT 3
- Make After.js http server agnostic HOT 3
- Grommet integration example HOT 1
- Is After.js not meant to support the latest version of Razzle? HOT 2
- After.js and @loadable/component it works incorrectly? HOT 5
- Cannot find module 'undefined', chunks.json not created in build folder after upgrading razzle to 4.1.0 HOT 2
- `TypeError: reactRouterDom.withRouter is not a function` after using `create-after-app` HOT 4
- Does After.js support something similar to next/head? HOT 2
- problematic set status after redirect HOT 1
- Brotli compression algorithm support on production? HOT 2
- HMR error: process is not defined HOT 3
- redirectTo not working, Throwing Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client HOT 4
- Component not triggering after browser back button HOT 1
- How to use Graphql with apollo-client or any other client in afterJS?
- loadable-component with After.js - any sample repo to get me started?
- How to prevent calling getInitialProps when follow the nested route?
- create-after-app issue with dependencies conflict
- Hash links are re-rendering page
- Status of this project HOT 16
- Potential bug with route matching 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 after.js.