mystor / meteor-routecore

Client and server side rendering/routing powered by React
84 stars 6 forks source link

Possible to have first render server side, then everything else client side? #16

Closed trusktr closed 9 years ago

trusktr commented 9 years ago

Is it possible to use meteor-routecore to render a page's initial HTML server-side, then the client takes over?

mystor commented 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.

trusktr commented 9 years ago

Very nice!

trusktr commented 9 years ago

Any pros and cons of this compared to https://github.com/reactjs/react-meteor?

mystor commented 9 years ago

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.

trusktr commented 9 years 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?).