How to setup Fast-Render

Does anyone know how do you setup the fast-render package to work with Angular or with other front end frameworks? Does it only work with react/blaze?

It says

After that, either make sure you’ve moved any code that calls Meteor.subscribe to shared code space (client and server), or use the SSR, Route, or Extra Data API’s to make data available on the client immediately upon page load.

If I have an Angular component in my /client directory that is using Meteor.subscribe, does that mean that I have to move it inside the /both directory? If I do that then I can’t import other components from /client into my component.

Unable to import on the server a module from a client directory:

Does it only work with react/blaze?

As far as I have read the docs, it should work with any Meteor frontend. The documentation also contains a React example.

If I have an Angular component in my /client directory that is using Meteor.subscribe, does that mean that I have to move it inside the /both directory?

I think you can leave your directory structure as it is (unless you want to move to SSR but I don’t even know if that’s possible in Meteor+Angular).

You can place the subscriptions within FastRender.onDataReady, at least that’s what the documentation says.

I think the best you can do is strictly following the documentation and once you get stuck again you can post some code or a link to your repository, if it’s open source.

No, fast-render is front end agnostic and should be able to be used with any front end that works with meteor.

You only need to move your components to shared code if you are server rendering. This ensures that the Meteor.subscribe stub on the server can be called to collect all your subscription data for inclusion in the initial HTML payload. When you are solely client rendering you will need to use FastRender.route to create server side routes that mirror your client routes that call Meteor.subscribe for those routes to capture the data on the server.

You can find the documentation on that here.

Additionally you will want to delay rendering your app until the data from the HTML payload has been parsed and loaded into the client cache. You can do that by (as @jkuester mentioned) using FastRender.onDataReady (Docs).

Hopefully this helps.