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
Passing an effect's action to its send() creates infinite loop #114
Comments
Yeah, agree with you 100% here - the |
Closing as 3.0 is imminent; wanna make sure all issues are taken care of. Releasing soooon™ ✨ |
it causes infinite loop when i put onload
model.js
|
Hi @crapthings, that's a different issue than what's described above, though I can see how it would cause an infinite loop. What you mean to write is |
should i use onload to get inital data ? i've found onload only happend on page reload, not switch route |
It should tho, related to #1 perhaps? |
The following creates an infinite loop of the
add
effect being called over and over.After some debugging, it looks like it's because
send-action
puts atype
property into theaction
parameter. And if you pass that action along,choo
does not overwrite that property.Per what I was just saying in IRC, I wonder if the idea of putting the
type
property in theaction
(like redux does) parameter adds any value since it's already the method name? It seems unnecessary to have to pick apart the object properties you want, or put them into apayload
property. Going a step further, I wonder if theaction
parameter should be renamed something likepayload
? (Which would make the above code more readable)The text was updated successfully, but these errors were encountered: