Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated signals anti-pattern #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martyphee
Copy link

@martyphee martyphee commented Aug 4, 2021

Potentially a contentious topic. The use of signals should be considered an anti-pattern.

Some reference material this is based off

Copy link
Contributor

@gregbeech gregbeech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like good advice to me, but probably best to get others to agree too.

Use signals decouple code or have code run as a side-effects. They can fail and you may never know. They're also hard to test for and have no consistent order.

#### Do
Use they for very limited purposes. Better to not use them at all.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just omit this line... "Don't" seems sufficient for signals.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gregbeech thinking about picking this back up.

#### Do
Use they for very limited purposes. Better to not use them at all.

### Large migrations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth expanding on this with some examples of how it should look.

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

Successfully merging this pull request may close these issues.

2 participants