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

warn-when-not-reactive: funcall vs. component use #766

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/releases/2022.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

> Committed but unreleased changes are put here, at the top. Older releases are detailed chronologically below.

#### Changed

- warn-when-not-reactive mentions another likely reason: `(subscribing-component)` instead of `[subscribing-component]`

#### Breaking

- [763](https://github.com/day8/re-frame/pull/763) on detecting an incorrect event structure, the `unwrap` interceptor now exceptions instead of writing an error to `js/console` and continuing
Expand Down
1 change: 1 addition & 0 deletions src/re_frame/subs.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
(when (and debug-enabled? (not (reactive?)))
(console :warn
"re-frame: Subscribe was called outside of a reactive context.\n"
"Did you mean `[subscribing-component]` but wrote `(subscribing-component)`?\n"
"See: https://day8.github.io/re-frame/FAQs/UseASubscriptionInAJsEvent/\n"
"https://day8.github.io/re-frame/FAQs/UseASubscriptionInAnEventHandler/")))

Expand Down