Understand FlowRouter's architectural philosophy
masterFlowRouter is a minimalistic router focused on UI performance. Unlike full-featured routers (like Iron Router), it follows these principles:
- Decoupled Rendering: FlowRouter does not handle rendering. It expects you to use a rendering framework (like
BlazeLayoutfor Blaze ormeteor-react-layoutfor React) within the route's action. - Subscription Management: While you can register subscriptions at the router layer, it is highly recommended to handle subscriptions at the template/component layer. FlowRouter does not wait for subscriptions to complete before moving to the next route.
- Client-Side Focus: FlowRouter is a client-side router and does not support server-side routing. For server-side routing in Meteor, use a dedicated solution like
meteorhacks:picker. - No Data Context: FlowRouter does not provide a global data context to avoid the reactivity issues associated with
Router.current().