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

mark utils.re-frame/defn as deprecated #17788

Merged
merged 3 commits into from
Nov 6, 2023
Merged
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: 2 additions & 2 deletions doc/new-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,9 @@ Prefer the pure version of `:json-rpc/call` (no callbacks).

### Registering event handlers

Register events with `re-frame.core/reg-event-fx` and follow [re-frame's best
Register events with `utils.re-frame/reg-event-fx` and follow [re-frame's best
practice](https://github.com/day8/re-frame/blob/39adca93673f334dc751ee2d99d340b51a9cc6db/docs/FAQs/BestPractice.md#use-the-fx-effect)
so use only `:db` and `:fx` effects. `rf/merge` is deprecated and should not be
so use only `:db` and `:fx` effects. `utils.re-frame/merge` and `utils.re-frame/defn` are deprecated and should not be
used in the new code in `src/status_im2/`. Don't use
`re-frame.core/reg-event-db`.

Expand Down
4 changes: 3 additions & 1 deletion src/utils/re_frame.clj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
event keywords under which the function will be registered
- TODO: add suport for `prepost-map?` (don't forget to add it to arglist)
- TODO: add validation of macro parameters"
{:arglists '([name doc-string? attr-map? [params*] body])}
{:arglists '([name doc-string? attr-map? [params*] body])
:deprecated true
:superseded-by "utils.re-frame/reg-event-fx"}
[name & fdecl]
(let [m (if (string? (first fdecl))
{:doc (first fdecl)}
Expand Down