-
Notifications
You must be signed in to change notification settings - Fork 9
Is there a way to wait for API response before server will render a page? #14
Comments
Hi! I'll have a look at it soon, probably tomorrow. |
What do you think about this approach? The only confusing thing for me is adding a |
I'll check it later in the weekend and come back to you. Thanks for the link. |
I've checked it. It's a nice solution, I might implement it into this starter kit once I have some time. ;-) |
also have the same question |
@kuatro |
It looks like I'll have some time in the upcoming weekend, will try to implement an async example and do some general updates. ;) |
👍 👍 👍 |
@janoist1 Please just give me some train of thought |
@bodyno I'm not sure what you wanna achieve but guessing you want a point where you can initiate your (async) API request. I chose route import Weather from './containers/WeatherContainer'
import { fetchWeatherData } from './modules/weather'
export default store => ({
path: 'weather',
component: Weather,
onEnter: () => {
// async get weather data
store.dispatch(fetchWeatherData())
}
}) I'm working on an async example that runs on server side. I'm not far from getting it done. ;-) |
@kuatro if you can show me exactly what needs to be done, I'm personally interested in fixing this and don't mind submitting a PR to make it happen |
Hey, @peterpme . |
Hello!
I found that server isn't waiting for async API response, and sends blank components to front-end.
The text was updated successfully, but these errors were encountered: