-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
Current coverage is
|
fix tests
Apologies for not responding to your comment in #104. I'm all for this update. Thank you for putting this PR together. I'm curious why the original But you can just create your own omit props with mapProps. |
Original |
The new behavior of |
@acdlite please answer on this PR having this comment As you see a lot of people and projects use this library, (I use it in every project now) and having React has changed (and only new recompose versions supports react 15 ) I need to have a decision what to do with mapPropsOnChange now. |
PS: I think it's not a big problem to write will or or not you to accept this, |
I read your comment about My main concern is that it's not clear to me (or most people, it seems) what If you're pressed for time, I would recommend using your own local version until we sort this out. Thanks for your patience :) |
Thank you, may be |
Okay I finally took another look at this. I think you're right @istarkov — removing |
Merged! Thanks @istarkov! I changed the behavior slightly... Instead of merging with the original props, it now acts like Will go out in the next release, soon. |
@acdlite I'm pretty sure that removing the merge of computed props into the original props will break components that currently expect props that are now lost because of the spread removal. I agree with and like this update, just wondering if this is going out in v1.0.0? It is a simple change, just need to add the |
Changed behavior will not work, as returning just |
@istarkov is right, I have created a PR to show what he said. |
Blah you guys are right. Okay, let's add the merging back and rename it |
#104 (comment)
IMHO
omit
should be removed.I'll explain why:
One of my most used construction with
mapPropsOnChange
wasspread operator allows me to not lost
a,b,c
in the future, and reuse them again.Now to make this work I can't use spread operator at all, because other props out of selection array i.e. ['a', 'b', 'c'] will be placed in
this.computedProps
so will be outdated.The code above after this PR now looks like
So every time I add property into selection array I need to add it into object to preserve.
Removing
omit
will help a lot, I could just remove all that...props
, and forget about property omitting logic inmapPropsOnChange
Also this simplify this component logic, I got a lot of questions from coworkers about this omitting functionality of
mapPropsOnChange