diff --git a/spikes/form/redux-form/client/form/form-two.js b/spikes/form/redux-form/client/form/form-two.js
index 8a02e06f..1ef3fb03 100644
--- a/spikes/form/redux-form/client/form/form-two.js
+++ b/spikes/form/redux-form/client/form/form-two.js
@@ -2,17 +2,10 @@ const React = require('react');
const ReactRouter = require('react-router');
const ReduxForm = require('redux-form');
const Styled = require('styled-components');
-// const Input = require('./input');
-// const InputRfProps = require('./inputRfProps');
+const Input = require('./input');
const validate = require('./validate');
const Form = require('./shared').form;
-const proxy = require('./proxy');
-
-const {
- Input
-} = proxy;
-
const {
browserHistory
} = ReactRouter;
diff --git a/spikes/form/redux-form/client/form/form.js b/spikes/form/redux-form/client/form/form.js
index 3064c45b..c285c42c 100644
--- a/spikes/form/redux-form/client/form/form.js
+++ b/spikes/form/redux-form/client/form/form.js
@@ -1,17 +1,11 @@
const React = require('react');
const ReduxForm = require('redux-form');
const Styled = require('styled-components');
-// const Input = require('./input');
+const Input = require('./input');
const InputRfProps = require('./inputRfProps');
const validate = require('./validate');
const Form = require('./shared').form;
-const proxy = require('./proxy');
-
-const {
- Input
-} = proxy;
-
const {
Field,
reduxForm
diff --git a/spikes/form/redux-form/client/form/input.js b/spikes/form/redux-form/client/form/input.js
index c4089b5c..6e49224c 100644
--- a/spikes/form/redux-form/client/form/input.js
+++ b/spikes/form/redux-form/client/form/input.js
@@ -1,5 +1,6 @@
const React = require('react');
const Styled = require('styled-components');
+const Proxy = require('./redux-form-proxy');
const {
default: styled
@@ -130,4 +131,4 @@ Input.propTypes = {
value: React.PropTypes.string
};
-module.exports = Input;
+module.exports = Proxy(Input);
diff --git a/spikes/form/redux-form/client/form/proxy.js b/spikes/form/redux-form/client/form/proxy.js
deleted file mode 100644
index 7ab46b27..00000000
--- a/spikes/form/redux-form/client/form/proxy.js
+++ /dev/null
@@ -1,19 +0,0 @@
-const transformPropsWith = require('transform-props-with');
-const Input = require('./input');
-
-const {
- default: tx
-} = transformPropsWith;
-
-const flattenProps = props => {
- const { input, meta, ...rest } = props;
- return {
- ...input,
- ...meta,
- ...rest
- };
-}
-
-module.exports = {
- Input: tx(flattenProps)(Input)
-};
diff --git a/spikes/form/redux-form/client/form/redux-form-proxy.js b/spikes/form/redux-form/client/form/redux-form-proxy.js
new file mode 100644
index 00000000..39ba7ddd
--- /dev/null
+++ b/spikes/form/redux-form/client/form/redux-form-proxy.js
@@ -0,0 +1,30 @@
+const React = require('react');
+const transformPropsWith = require('transform-props-with');
+
+const {
+ default: tx
+} = transformPropsWith;
+
+const Proxy = tx(props => {
+ const { input, meta, ...rest } = props;
+ return {
+ ...input,
+ ...meta,
+ ...rest
+ };
+});
+
+const isReduxForm = (props) =>
+ props.hasOwnProperty('input') || props.hasOwnProperty('meta');
+
+module.exports = (Component) => {
+ const ProxiedComponent = Proxy(Component);
+
+ return (props) => {
+ return isReduxForm(props) ? (
+
+ ) : (
+
+ )
+ }
+};