Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Dec 7, 2023
1 parent cce17c1 commit 83820a7
Show file tree
Hide file tree
Showing 5 changed files with 1,259 additions and 1,257 deletions.
6 changes: 4 additions & 2 deletions FAQs/use-cofx-as-fx/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1592,10 +1592,12 @@ <h2 id="context">Context<a class="headerlink" href="#context" title="Permanent l


<p>With <code>reg-event-fx</code>, you receive a map of coeffect values, and you're expected to return a map of effect values.
It's a coincidence that <code>:db</code> is the name of both an effect and a coeffect.
It's a coincidence that <code>:db</code> identifies both an effect <em>and</em> a coeffect.
But re-frame adds other coeffects, such as <code>:event</code>, which it does <em>not</em> consider effects.</p>
<p>So your handler ends up doing <code>(update-in {:db {:clicks 0} :event [::cow-clicked-bad] :your-other-coeffect 25} ...)</code>. </p>
<p>Any coeffects you declare cause this problem, too. You might have a coeffect, like <code>:db</code>, which shares its name with an effect. But that's a deliberate design decision, not a default.</p>
<p>There's probably no effect handler for <code>:event</code>. Hence the warning.
Coeffects which you declare, such as <code>your-other-coeffect</code>, may cause the same problem.</p>
<p>You might have a coeffect, similar to <code>:db</code>, which shares its name with an effect. But that's a deliberate design decision, not a default.</p>



Expand Down
Loading

0 comments on commit 83820a7

Please sign in to comment.