mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-27 08:55:39 +00:00
Mark utils.re-frame/defn as deprecated (#17788)
Also suggest to use utils.re-frame/reg-event-fx instead of utils.re-frame/defn
This commit is contained in:
parent
4ac7f0bdda
commit
b47c97a4fd
@ -467,9 +467,9 @@ Prefer the pure version of `:json-rpc/call` (no callbacks).
|
|||||||
|
|
||||||
### Registering event handlers
|
### 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)
|
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
|
used in the new code in `src/status_im2/`. Don't use
|
||||||
`re-frame.core/reg-event-db`.
|
`re-frame.core/reg-event-db`.
|
||||||
|
|
||||||
|
@ -28,7 +28,9 @@
|
|||||||
event keywords under which the function will be registered
|
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 suport for `prepost-map?` (don't forget to add it to arglist)
|
||||||
- TODO: add validation of macro parameters"
|
- 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]
|
[name & fdecl]
|
||||||
(let [m (if (string? (first fdecl))
|
(let [m (if (string? (first fdecl))
|
||||||
{:doc (first fdecl)}
|
{:doc (first fdecl)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user