stampit-org / react-stamp

Composables for React.
370 stars 10 forks source link

Override instead of throw for select React methods #6

Closed troutowicz closed 9 years ago

troutowicz commented 9 years ago

I feel throwing on duplicate render and shouldComponentUpdate methods is unnecessary and takes away from the the power of stamp composition. Instead, we can just override with last-in priority. This would simplify the React logic quite a bit, leaving only the React lifecycle method wrapping.

I don't consider this unexpected behavior, if anything it adds flexibility. Thoughts @ericelliott?

ericelliott commented 9 years ago

Agreed!

troutowicz commented 9 years ago

Taking this a step further, it would be awesome to have shouldComponentUpdate methods wrap and OR their results. There is a discussion about this here. I have pushed the proposed changes to this PR.

ericelliott commented 9 years ago

:+1: