Skip to content

Commit

Permalink
[feature] Describe the :path interceptor's path with a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kimo-k committed Jun 26, 2023
1 parent 4e1a52e commit 7388546
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/releases/2023.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@
#### Breaking
- `re-frame.std-interceptors/path` now keeps a `:re-frame.db/path-history` key in the context, not a `:re-frame-path/db-store` key. This shouldn't affect users, unless you're directly hacking the event loop.
- [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.

#### Added
- Interceptors now have an optional `:comment` key. It's a no-op.
- `re-frame.std-interceptors/path` now remembers the path it uses in a `:comment`. ((re-frame-10x#165)[https://github.com/day8/re-frame-10x/issues/165])
1 change: 1 addition & 0 deletions src/re_frame/std_interceptors.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
(console :error "re-frame: \"path\" interceptor given no params"))
(->interceptor
:id :path
:comment {:re-frame.db/path path}
:before (fn
[context]
(let [original-db (get-coeffect context :db)]
Expand Down

0 comments on commit 7388546

Please sign in to comment.