ember-learn / ember-learn/guides-source

Improve the Contextual component example in the GJS branch

Open
#2,139 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
161
Forks
512
Avg merge
4d 9h
Merged PRs (30d)
4

Description

While reviewing https://github.com/ember-learn/guides-source/pull/2127 we hit a few issues around the "Super Form" example in the "contextual components" section.

We decided to fix the example so that it's technically correct but we really need to improve this whole section 🙈

Some suggestions of what to fix (not an exhaustive list)

- we should never really be yielding out `this`, that is a bad idea that leads to bad outcomes with bad API design. If we want to yield some internal state from the SuperForm then it should be more granular
- this whole example is very much a toy and it doesn't describe why you might want to use contextual components at all. Maybe adding the internal state might fix that, maybe we need better context in the example.
- the null hypothesis: should we even teach contextual components any more? is it a valuable architectural decision in 2025
- do we even need the `(helper` helper? 🙈

feel free to add any more suggestions to this list as you see fit 👍

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.