martyjs / marty

A Javascript library for state management in React applications
http://martyjs.org
MIT License
1.09k stars 76 forks source link

Generate lifecycle methods at container creation #263

Closed taion closed 9 years ago

taion commented 9 years ago

For #249

This also fixes a bug with componentWillReceiveProps where the base implementation would be overwritten by the configured one. I didn't explicitly add a test for this, but the existing test fails with thew new code without the change to RESERVED_FUNCTIONS.

taion commented 9 years ago

Perhaps it would be better to change RESERVED_FUNCTIONS to be Object.keys(BASE_SPECIFICATION), where BASE_SPECIFICATION is defined as a constant, then special-case done to be overridable.

jhollingworth commented 9 years ago

:+1: looks good, thanks!