From 295ef0063b933e13b2ddd541c108b386b35b648b Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Tue, 27 Jan 2015 09:36:14 -0800 Subject: [PATCH] We don't currently have a way to trace the origin of a mixin This makes it more difficult to find bugs in mixins both dynamically and using a static type system. We also don't have a way to find these to be upgraded to a new mixin syntax if we needed to. This hook is currently an optional noop but could be made required to create a mixin class. --- src/browser/ui/React.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/browser/ui/React.js b/src/browser/ui/React.js index 3e8a5159b9..f1175469b3 100644 --- a/src/browser/ui/React.js +++ b/src/browser/ui/React.js @@ -65,6 +65,10 @@ var React = { createClass: ReactClass.createClass, createElement: createElement, createFactory: createFactory, + createMixin: function(mixin) { + // Currently a noop. Will be used to validate and trace mixins. + return mixin; + }, constructAndRenderComponent: ReactMount.constructAndRenderComponent, constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID, findDOMNode: findDOMNode,