When I pass a connected component export default connect(ComponentName) to a React Route route like code below,
<Route path={path} component={ComponentName}/>
I get the following errors,
You must pass a component to the function returned by connect.
Instead received {"match":{"path":"/:code","url":"/sample-
code","isExact":true,"params":{"code":"sample-code"}},"location":
{"pathname":"/sample-code","search":"","hash":""},"history":
{"length":40,"action":"POP","location":{"pathname":"/sample-
code","search":"","hash":""}}}
Can I pass a connected component to route component?