Closed lijunle closed 8 years ago
I think so - .apply is now just the same as .set, right?
Yes, the following two code snippets do the same thing exactly:
a.apply(function (prevState) {
return function (x) { return x / 8 }
});
a.set(function (x) {
return x / 8;
});
@ezmiller, here's a low hanging fruit PR if you want a warmup task!
The 2.0 changes to decouple from react impact this issue in ways that were not obvious to me. This will need to be thought through more deeply and resolved. There's currently a failing test ("apply against store") demonstrating the problem.
I'm wrong, the test was broken due to my dumb error, apply works fine against stores
\cc @dustingetz @danielmiladinov
After this change, the usage syntax for
apply
function looks weird.Are we going to deprecated/remove this API?