Comments (20)
@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?
from mantra.
You mean this one? https://github.com/mantrajs/mantra-sample-blog-app
from mantra.
@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.
from mantra.
Check this: https://atmospherejs.com/meteor/modules
from mantra.
ah! Yes, that'll do. I'll explore that and then come back to this with a more informed opinion.
from mantra.
what's new with the SSR, now as we put our modules into /imports
does this solve our problem with SSR?
or what is the issue with SRR?
from mantra.
Actually, now we've come back to the client directory.
See: mantrajs/mantra-sample-blog-app@1a2ecbc
There are some ways. We'll take care of this after the module release coming on Monday.
from mantra.
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.
from mantra.
@arunoda any update on this one?
from mantra.
Was playing around with this. Naively loading mantra modules on the server doesn't work due to things like method_stubs and use of Meteor.[user|subscribe]
methods inside containers and actions. To support SSR will some explicit effort.
from mantra.
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.
from mantra.
@natecox I feel like it's fine to use the No-SSR packages for cases like this? Personally so far I've found SSR to work pretty well (although it's in a non-Mantra app).
from mantra.
@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.
from mantra.
Oh No-SSR
that's a really clever package. Yea right now I'm using https://github.com/thereactivestack/meteor-react-router-ssr as an example to inject OpenGraph meta tags into pages served by meteor. Quite a hack but does get the most important use case covered.
from mantra.
@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?
from mantra.
@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.
from mantra.
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.
from mantra.
I think ill just use spiderable
for now
from mantra.
Any updates on the general SSR topic for mantra @arunoda? ;)
from mantra.
+1 This would be a really nice feature
from mantra.
Related Issues (20)
- Correct Way to Install a Bootstrap Theme? HOT 3
- Controllers and server-side context HOT 3
- Where is the best place to put your initial states with Reactive Dict/Local State HOT 1
- Unable to sign up /login on Mantra talk HOT 4
- should we use sub-manager for mantra ? HOT 2
- A linter for Mantra
- Accounts.onPasswordResetLink .... where??
- Dead link for Mantra live demo HOT 2
- Support Apollo HOT 1
- Meteor/MiniMongo is Local State HOT 1
- Global Subscription HOT 6
- Issue with re-rendering on Google Chrome Android (Moblie)
- Meteor methods in lib folder HOT 1
- Problem with Routing and Alert
- More intuitive react component naming convention HOT 4
- Ability to module-namespace actions HOT 13
- Issue with Mobile HOT 1
- how to get REF of containers component
- Clarify module meaning HOT 5
- Problems with @storybook/mantra-core and react-komposer@2 HOT 1
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 mantra.