-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make a feathers-ssr behavior that switches between sockets/XHR #97
Comments
marshallswain
changed the title
steal-socket.io client needs to read from the XHR_CACHE
Make a feathers-ssr behavior that switches between socket/XHR
Nov 29, 2016
Notes from the meeting. feathersClient - maintained independently
Making re-attachment work 1. Socket.io on the server / low level
2. can-connect-server-side-rendering var ssrConnection = connect(["data-url"],{
url: "/api/todos"
})
Todo.connection = connect(["can-connect-ssr","feathers-socket.io"],{
serverSideConnection: ssrConnection,
Map: Todo
});
behavior("can-connect-ssr",function(baseConnection){
getListData: function(){
if(!Zone.re-attached || isNode) {
return this.serverSideConnection.getListData.apply(this.serverSideConnection, arguments);
} else {
baseConnection.getListData({})
}
}
}) |
marshallswain
changed the title
Make a feathers-ssr behavior that switches between socket/XHR
Make a feathers-ssr behavior that switches between sockets/XHR
Nov 29, 2016
This won't be necessary if donejs/done-ssr#198 happens. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
XHR requests made by the SSR server get stored in the XHR_CACHE. The socket.io client isn't aware of it, so it makes the same requests again instead of using the cached ones.Based on the meeting notes in the next comment, we need to make a behavior specifically for SSR that...
feathers
behavior) on the client AFTER re-attachment.The text was updated successfully, but these errors were encountered: