Skip to content
This repository has been archived by the owner on May 26, 2019. It is now read-only.

Make it clearer where actions can be passed & used #2306

Open
jenweber opened this issue Mar 23, 2018 · 2 comments
Open

Make it clearer where actions can be passed & used #2306

jenweber opened this issue Mar 23, 2018 · 2 comments

Comments

@jenweber
Copy link
Contributor

This page in the guides talks about actions, but doesn't cover some major gotchas around where actions should be put and where they can be passed.

Examples:

  • An action defined in a controller can be passed to a route's child components
  • An action in the route's js can't be passed to a child component
  • An action in a route js can be used in the route's template directly

This should be explained somehow.

@sbatson5
Copy link
Contributor

sbatson5 commented Apr 8, 2018

Hi @jenweber 👋 . I wouldn't mind taking a stab at this. There is a lot to unpack when it comes to actions, however. Would it make sense to split some of this up? For instance, perhaps moving some controller specific pieces to the controllers section? There should also be some room for explaining what the action helper is doing for us (i.e. setting the context of the function). It just feels like it's a bit bigger than just the Templates section 🤔

@jenweber
Copy link
Contributor Author

jenweber commented Apr 8, 2018

@sbatson I agree that it’s a bigger issue than one section. I recommend separate PRs so that changes are easier to review. But you can drop some ideas here in this issue for brainstorming

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants