Comments (6)
Hi, I'm trying to figure out how to fetch 2 things: 1 always on server and client, and the second one only on server.
in this case (all on server and some on client) you need to implement filter only on client.
do yo use the latest 1.0.x branch version?
from redux-async-connect.
Yes, I'm using version 1.0.0-rc2
.
Now I removed filter from server and added to <ReduxAsyncConnect/>
component on client.
But request is done on server because when page render I do not see that request on Network
panel on Chrome Dev Tools.
from redux-async-connect.
I don't khow how filtering on the client is not allowing to fetch deferred resources on the server.
I've check your code and I don't see it.
from redux-async-connect.
I'm on rc4 v1. I can see that when async connect hight order component load checks if there was already loaded on the server: https://github.com/Rezonans/redux-async-connect/blob/v1/modules/ReduxAsyncConnect.js#L110
So if I filter on the server this way:
@asyncConnect([{
deferred: true,
promise: (options) => {
return options.store.dispatch(loadDeferredThing(options.params.id));
},
}])
loadDeferredThing
won't be loaded at all. But if I filter it only on the client on the server that data will be fetched. So that do not works for me. Because I want not to fetch loadDeferredThing
on the server.
from redux-async-connect.
I made a PR to illustrate my issue #63
from redux-async-connect.
In RC4, it looks like the filter parameter has moved from <ReduxAsyncConnection>
to loadOnServer
function loadOnServer(args) {
var result = loadAsyncConnect(args);
function loadAsyncConnect(_ref) {
var components = _ref.components;
var _ref$filter = _ref.filter;
var filter = _ref$filter === undefined ? function () {
return true;
} : _ref$filter;
from redux-async-connect.
Related Issues (20)
- How to perform a synchronous call?
- How to access props in reduxAsyncConnect function? HOT 2
- No documentation for loadOnServer
- loadOnServer is not in sync with AsyncConnect HOT 1
- How to sync @asyncConnect with loadOnServer
- asyncConnect doesn't block mounting when programmatically navigating
- How can I use it with immutablejs? HOT 2
- Accessing PropTypes via the main React package is deprecated.
- The sample client code in usage doesn't work. HOT 2
- Cannot find module 'react-router/lib/RouterContext' HOT 3
- npm Warning requires [email protected] HOT 2
- How can I use it with react-router v4? HOT 3
- use react@16 ??? HOT 1
- How to use with code splitting / loadable-components
- Load empty block by server side rendering HOT 1
- Support react-v15.2.x
- upgrade needed to react "react": "^15.2.1", HOT 1
- first entry page miss render
- How loadOnServer works? HOT 1
- Help needed: dipatch, getState not being made available to action creators
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 redux-async-connect.