From 1b662fd574ea0c5f09ccefa751396f38f29ee86c Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 27 Aug 2019 21:29:44 -0400 Subject: [PATCH] pass only non observable props to wrapped component --- test/observables/src/observe.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/observables/src/observe.js b/test/observables/src/observe.js index 2f44dd9..9051c1f 100644 --- a/test/observables/src/observe.js +++ b/test/observables/src/observe.js @@ -55,7 +55,15 @@ function observe(WrappedComponent) { } render() { - return ; + const props = Object.keys(this.props).reduce((accum, curr) => { + if(!isObservable(this.props[curr])){ + accum[curr] = this.props[curr]; + return accum; + } + return accum; + }, {}); + + return ; } }; }