Skip to content

Commit

Permalink
Clearify and amend import paths in RFC #496 and #671
Browse files Browse the repository at this point in the history
This resolves a small confusion between the two RFCs.
  • Loading branch information
chancancode committed Jan 7, 2021
1 parent 258dff4 commit 6f6d08e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion text/0496-handlebars-strict-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ On the other hand, the following built-in constructs will need to be imported
* `on` (`import { on } from '@ember/modifier'`)
* `Input` (`import { Input } from '@ember/component`)
* `LinkTo` (`import { LinkTo } from '@ember/routing`)
* `TextArea` (`import { TextArea } from '@ember/component'`)
* `Textarea` (`import { Textarea } from '@ember/component'`)

In general, built-ins that can be made importable should be imported. The main
difference are that some of the keywords uses internal language features (e.g.
Expand Down
12 changes: 12 additions & 0 deletions text/0671-modernize-built-in-components-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,18 @@ the built-in components on these legacy implementaitons, but custom subclasses
will continue to work. The deprecation message should provide information about
this legacy addon, or link to the deprecation details page that does.
Note that in accordance with [RFC #496](0496-handlebars-strict-mode.md), the
following import paths will be made available for use in strict mode:
* `Input` (`import { Input } from '@ember/component`)
* `LinkTo` (`import { LinkTo } from '@ember/routing`)
* `Textarea` (`import { Textarea } from '@ember/component'`)
However, unlike the deprecated import paths in group 1, an opaque value will be
made available in these locations. Since they do not expose the implementation
details of the built-in components, these new import paths do not have the same
issue described in this RFC.
The third and forth prevents globally modifiying the behavior of built-in
components. Users are encouraged to create wrapper components for use in their
apps or create custom subclasses using the legacy addon.
Expand Down

0 comments on commit 6f6d08e

Please sign in to comment.