What a best alternative for FlowRouter now after lost arunoda and kadira?

I am now maintaining FastRender and InjectData. I’d love to help maintain FlowRouter as well since they are closely related.

2 Likes

I also have a fork of FlowRouter available as staringatlights:flow-router

If you depend on FastRender I’d recommend you use my fork until your FlowRouter-fork-of-choice updates their dependencies to use staringatlights:fast-render instead of meteorhacks:fast-render.

Edit: Since upgrading FlowRouter directly can cause a huge pain in updating dependencies. A quicker way to get your app up and running on Meteor 1.4.2+ is to continue to use meteorhacks:flow-router and/or meteorhacks:fast-render and simply add staringatlights:inject-data to your project. This will monkey patch the functionality so that it works for Meteor 1.4.2.

4 Likes

Is there a router out there that allows me to use Blaze and Vue.js side by side? I’m not sure what the issue is, but I got the impression from @akryum that FlowRouter does not play well with Vue.js.

I have been using flowrouter-ssr and ssr has stopped working on 1.4. Is there something I can do, to get it to work again?

I have placed a post on Flow Router expressing my interest to manage it 4 days back and I am still waiting to hear from Arunoda - https://github.com/kadirahq/flow-router/issues/708

1 Like

As I said in PM, FlowRouter doesn’t play well with Vue out-of-the-box, but it’s still possible to make the two work together. I didn’t try to use Blaze and Vue side-by-side, but you could change how the route are handle depending on if it is a route pointing to a blaze page or to a Vue component.

1 Like

Will you explain the differences in how the route is handled, Vue vs. Blaze?

Thanks @akryum,

If you mean nested routes in this sense

www.myapp.com/route1/nested-route1

Then, my application does not use nested routes.

Everything in my application uses this format:

www.myapp.com/route1
www.myapp.com/route2

I don’t use parameters on the route, I use Session or Mongo to pass state between routes.

I see that repo was last updated almost a year ago, if you had to start fresh today, in my situation, would you approach it the same?

Add staringatlights:inject-data to your project. If it doesn’t work for
some reason, open an issue at github.com/abecks/meteor-inject-data

1 Like

If the route is a Blaze one, just do as you do now with Blaze. Else, use a root Vue component containing a <component :is="def"> to dynamically change the display component definition.
Let’s say you have two Vue components, Page1.vue and Page2.vue. You can add two routes that have some special info that tells they are vue routes. Then, you can display the root component mentioned above and then change the def property depending on the route to display either Page1.vue or Page2.vue.

Some ideas (I didn’t test it):

// Reset (so the vue page is not displayed on Blaze pages
FlowRouter.triggers.enter(() => {
  renderVuePage(null);
});

// Example Vue Page
import Page1 from 'Page1.vue'
FlowRouter.route('/page1', {
    action: function(params) {
        renderVuePage(Page1);
    }
});

// Vue instance to store reactive data globally
export const routerInfo = new Vue({
  data: {
    def: null
  }
})

function renderVuePage(def) {
  routerInfo.def = def
}

Root Vue:

<template>
  <div class="vue-page" v-if="def">
    <component :is="def"></component>
  </div>
</template>

<script>
import { routerInfo } from '/routes'

export default {
  computed: {
    def () {
      return routerInfo.def
    }
  }
}
</script>
2 Likes

I just updated the meteor-react-router-ssr package to play nicely with Meteor 1.4.2 using the new fast-render and inject-data from @abecks and published it: jconley:react-router-ssr. I’m using it in a project so will attempt to keep it up to date.

4 Likes

This. It’s time for a principled stand after witnessing both Iron-Routers “do-everything” approach and Flow-Router + template subs + Flow layout approach. The MDG knows the score, and while an academic “divorced” attitude might provide the illusion of being free to do research and push the limits (Apollo etc), it risks undermining the viability of their entire vehicle. Let’s face it, MDG has the largest stake in the community as a whole, and as such has to protect against needless attrition for it’s own future existence as an entity.

I think that certain community efforts should be promoted to official packages, like email and reactive-var…

mind-you: I’m not speaking of new features being developed, but rather guarantees against breaking changes as meteor moves forward from 1.4.x

3 Likes

For those who are using mantrajs,
Here’s a nice tutorial to replace flow-router with react-router

4 Likes

This is really sad to see people leaving meteor.

Why? Was it sad to see people leave PHP for RoR, or leave RoR for Meteor? You can still build with PHP, RoR or Meteor, but some people have reasons to explore other ways of building apps.

3 Likes

I also hope so but it’s a cruel VC world and sometimes they call it ‘pivot’. Huh, nice way to guys to abandon their girls :slight_smile: “Sorry, I have just pivoted, nothing personal just building platform for love making adding flexibility to the sleeping room and bath room and making it easy to go from one to another”

Why though? It’s been working just fine for years. It may not be actively maintained, but that doesn’t mean you can’t import it into your project and use it right now. It will work just fine.

2 Likes

I agree with you @maxhodges