-
-
Notifications
You must be signed in to change notification settings - Fork 405
Description
In #311 we added official named arguments to {{link-to}} (and therefore making <LinkTo> possible). Now that people have had time to migrate (and there are codemods available), it is time to kill the positional arguments api for {{link-to}}.
Reasons:
- It's no longer idiomatic, as it is being taught as a component, and components largely don't take positional arguments anymore due to widespread angle-bracket invocation usage (unless they are mimicking "control flows", which
{{link-to}}is not) - The positional argument version and the non-block version are implemented via magic AST transforms, making it not "just a regular ember component" and not importable
It would be nice the get on this asap so the deprecation can land before strict mode (#496) lands in a stable release. Otherwise, we will end up in a situation where the "normal" version of <LinkTo> requires an import but the "legacy" form {{link-to}} does not. That will be a while, so we have some time, but still we should start soon.
I would expect that this should also deprecate (query-params) as it is not necessary using the named arguments version.
To be clear, {{#link-to route=... model=...}}...{{/link-to}} would still work, because you can invoke any components with either curly or angle bracket form, but it's the positional arguments mapping that we are talking about here.