-
Notifications
You must be signed in to change notification settings - Fork 50
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
Server Side Rendering (SSR) #11
Comments
@arunoda I think I'm behind the times here. Can you give me a link to the references you're using for Meteor 1.3's structure? |
You mean this one? https://github.com/mantrajs/mantra-sample-blog-app |
@arunoda no, sorry, in reference to Meteor 1.3 itself. From a few comments made it seems like Meteor 1.3 is making changes to the directory structure, but I haven't been able to find a good explanation of what those are yet. |
Check this: https://atmospherejs.com/meteor/modules |
ah! Yes, that'll do. I'll explore that and then come back to this with a more informed opinion. |
what's new with the SSR, now as we put our modules into or what is the issue with SRR? |
Actually, now we've come back to the client directory. There are some ways. We'll take care of this after the module release coming on Monday. |
Note: Here with SSR, we need to create a context from the scratch for every request. We need to find a way to deal with that. Otherwise, this will lead to race conditions and other issues. |
@arunoda any update on this one? |
Was playing around with this. Naively loading mantra modules on the server doesn't work due to things like method_stubs and use of |
I'm coming to the conclusion that SSR is a pain in the ass in general. I just had an issue on a large project where SSR would fail because the components being rendered used libraries like GoogleMaps from atmosphere, with the code exported to use client only... meaning it just wasn't there on the server side render and everything failed horribly. Same type of issue with Redux. My solution was to write a router specifically for the server and just serve simple pages. Works fine for opengraph, not nearly as good for actual SEO. |
@SachaG That's actually pretty cool, I hadn't seen that one yet. Not sure it solves the issues I was having with Redux, because that's so tightly coupled with global state, but that's probably more to do with the fact that I added Redux late into the project and it's probably not set up optimally. |
Oh |
@tonyxiao I'm probably going to have to do the same thing on my project now. Any advice on getting it implemented properly and converting from FlowRouter? |
@natecox Here I just created it gist - https://gist.github.com/tonyxiao/92e3d994eec0d762a17e. It's a real hack but if @eXon uses it it must be ok. |
I ended up converting from FlowRouter to ReactRouter due to the tighter integration with react ecosystem. Was a bit painful but took one day in total so not too bad. Biggest gotcha was that you can't just pass any props into component rendered by ReactRouter. That required architecting components a bit differently. (Mapping more closely to pages if you want to parse the params). Anyways that's probably off topic so I'll stop here. |
I think ill just use |
Any updates on the general SSR topic for mantra @arunoda? ;) |
+1 This would be a really nice feature |
Currently, we don't have support for SSR.
Also our directory layout does not support it.
We need to work on it.
This is because of current state of Meteor 1.3
I didn't wanted to put code into
imports
directory and but we can't put them into a common place because, there might be some modules (code) available only for client.Then even the user don't wanna use SSR, he'll has to face issues of SSR.
May be we need to put the app into the imports directory anyway
The text was updated successfully, but these errors were encountered: