Routes inside a package and Iron / Flow routers

Hi,

If my package contains routes, and if I choose one of iron or flow, does it takes me away from a part of developpers community by making a choice or another ? I mean that an app developper could not use my package if he is using the other router package, right?

Is it a good idea to implement routes inside a complex package ?
What would be the best architecture so my package does not depend on a particular router package ?

Thanks,
Mickael.

Routing should be left up to the developer using your package unless you have a terribly good reason to completely override his routing namespace.

What will lock you is your choice in Blaze/React templates. As of now Iā€™d go with Blaze since you can put that in a React component with a funky package. Not sure of the other way around.

Honestly, if your package is so complex, split it up. Make the templates one package and the optional routing another that depends on the template package.

2 Likes