From b0ae800d64f79fcb9b719d9099303bcaef0ddf04 Mon Sep 17 00:00:00 2001 From: Daniel Miladinov Date: Wed, 25 Sep 2013 23:52:29 -0400 Subject: [PATCH] Change spec policy for getDefaultProps to SpecPolicy.DEFINE_MANY_MERGED This will allow multiple mixins for a component to define getDefaultProps and their values will be merged. See also: https://groups.google.com/d/msg/reactjs/UzSiXw2Vo5s/FxK7AHWOzLMJ --- src/core/ReactCompositeComponent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ReactCompositeComponent.js b/src/core/ReactCompositeComponent.js index af3537e969..2d4b09efd3 100644 --- a/src/core/ReactCompositeComponent.js +++ b/src/core/ReactCompositeComponent.js @@ -110,7 +110,7 @@ var ReactCompositeComponentInterface = { * @return {object} * @optional */ - getDefaultProps: SpecPolicy.DEFINE_ONCE, + getDefaultProps: SpecPolicy.DEFINE_MANY_MERGED, /** * Invoked once before the component is mounted. The return value will be used