From 81bbb6aee00839a98ad3f87482203d6a503f14d8 Mon Sep 17 00:00:00 2001 From: Anton Korzunov Date: Sat, 27 Jul 2019 14:41:13 +1000 Subject: [PATCH] fix: apend react-hot-dom patch note to the ProxyFacade, fixes #1311 --- src/proxy/createClassProxy.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/proxy/createClassProxy.js b/src/proxy/createClassProxy.js index e23f084a4..dcea3aa9b 100644 --- a/src/proxy/createClassProxy.js +++ b/src/proxy/createClassProxy.js @@ -261,6 +261,17 @@ function createClassProxy(InitialComponent, proxyKey, options = {}) { // eslint-disable-next-line func-names ProxyFacade = function(props, context) { + /* + + ! THIS IS NOT YOUR COMPONENT ! + ! THIS IS REACT-HOT-LOADER ! + + And you probably looking for a function component of yours + Easy - just reconfigure your application a bit + see https://github.com/gaearon/react-hot-loader/issues/1311 + + */ + const result = CurrentComponent(props, context); // This is a Relay-style container constructor. We can't do the prototype-