erikras / erikras/react-redux-universal-hot-example

Call API only from the server side

Open
#924 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.1k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to make API calls only on the server side, so I've replaced fetchDataDeferred to fetchData in Widgest.js according to instructions:

```
function fetchData(getState, dispatch) {
if (!isLoaded(getState())) {
return dispatch(loadWidgets());
}
}

@connectData(fetchData, null)
```

But client still makes API call when you navigate from the main page to widgets.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.