Since FlowRouter is basically the standard now (It’s posted on the meteor guide) I’ve decided to switch on over from IronRouter, and I’m having a few issues …
First off, trying to follow with an exact copy & paste from the guide, tells me to use this code:
It seems that the route itself is working correctly, but when I go to the route, the “action” line throws an error:
SyntaxError: Unexpected token (
The error is thrown on the action() line… Is that incorrect syntax?
Second question: When I was searching for a solution to this problem, I noticed some people saying the many meteor packages don’t work with anything but ironrouter, such as the default accounts package? This post was from over a year ago so I’m not sure if it is outdated, but is my normal functionality going to be broken from using flow?
Secondly, depends on what packages you’re using, but I think things are better now than last year. accounts-ui doesn’t depend on iron-router so no worries there.
As for the packages that are compatible with FlowRouter I can’t remember the last time this was an issue for me, so the community seems to be on top of it. If you find a plugin that doesn’t work with it, you will almost certainly find a plugin that does the same thing but with FlowRouter compatibility.
Thanks for the link! I checked that out a bit already.
My original project was actually based off of the DiscoverMeteor foundation.
Since the book has not been updated yet, I think it would be really helpful if there was a page with more solid information on how to transition the DiscoverMeteor project to Flow Router (for users without React). Been working on it this morning and while most of it seems straight forward, I’m going to have to toy around with things like the loading page, the shared controllers, and checking if the user is logged in, to see how I’m supposed to get them to work in Flow.
Would be very helpful if there was a guide (or an update to the book) based around these things! Because I am going to give React a try after switching the router over… but I have never used React and do not want to switch 2 formats at once, and did not find your series until after I began the transition.
(Edit: I went through the earlier articles and noticed that the transition to flow starts BEFORE React, so scratch much of what I said. I do think it would be helpful for a quick guide to transition users from DiscoverMeteor to Flow, but the Blaze-React series is more helpful than I thought! Thanks!)