Closed trusktr closed 9 years ago
That should be happening by default if you define your routes in code which is shared between the client and the server.
Very nice!
Any pros and cons of this compared to https://github.com/reactjs/react-meteor?
Pros: I don't know if it's changed, but react-meteor didn't come with much infrastructure to actually help build apps. If I remember correctly, it comes with a simple mixin and React, and that's about it. In contrast, this package comes with a full routing system, as well as a modified react component creation pipeline which gives better integration between Meteor and React components and data sources.
Cons: Routecore still runs on an older version of react (0.11.1) which means that it doesn't have access to all of the new bells and whistles, and the documentation you will find online for react may not necessarily work with Routecore. I would love to get out a Routecore v2 which uses the most recent version of react (It would probably have to be a v2 to avoid breaking software using the current version of Routecore) and uses a more React-Router-like routing system, but I just don't have the time to do it right now.
There may be other differences, but I haven't had a chance to look at react-meteor more recently than about a year ago.
It doesn't seem like react-meteor has changed in concept.
There don't seem to be any severly breaking changes in the React changelog (as far as I know, aybe you see an impacting change?).
Is it possible to use meteor-routecore to render a page's initial HTML server-side, then the client takes over?