Wondering why route helpers by default is false on phoenix framework?

hello everyone, let me ask why phoenixframework sets the false rule on the route helpers that have been set, in other words the route helper does not exist by default and is present when activated, what is the cause? are there any performance issues with this?

then, regarding the active navbar problem or wanting to match the router pattern, for example the client is on route A and the system wants to give an active notification that he is on route A, I think route helpers are the easiest choice and the landscape is wider, then when I saw that The default route helper in Phoenix is ​​false, so I was wondering if enabling the route helper would be a performance problem for the app I’m building? or is there another issue?

thank you

Path helpers are still supported for existing projects, but for new projects verified routes are supposed to be used. The route helpers weren’t a great design in hindsight, given you needed quite the mental model for grasphing how they generate their functions and even that broke down in places. Also errors were hard to grasp given the automated nature behind the functions.

4 Likes

Will the community remove this feature in the future? If the problem is confusion due to unclear definitions here, it makes sense to me why it defaults to false. Is performance also an issue here?

Route helpers would likely be removed in a phoenix 2.0, but I don’t think there are any plans for that.

Performance wasn’t a concern afaik. We would’ve seen changes earlier if that would’ve been the case.

What do route helpers give you here that Verified Routes don’t?

Likely a codebase that he is not mandated to refactor. :person_shrugging:

1 Like

after reviewing, verified routes I don’t think is too bad, it fulfills my need for route helpers…

1 Like