Wrapping Provider in same component throws Element type is invalid: expected a string (for built-in components) or a class/function but got: object
Wrapping Provider in same component throws Element type is invalid: expected a string (for built-in components) or a class/function but got: object I wrote a simple counter example in both Mobx & Redux & it works Full demo is available https://codesandbox.io/s/nw303w6jxl But if I remove Provider from ./src/index.js Provider ./src/index.js const App = () => ( ); & put it in ./src/redux.js while default exporting it throws an error ./src/redux.js export default ( <Provider store={store}> <ConnectReduxApp /> </Provider> ); Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function but got: object Its working but I don't know why its happening? I checked the typeof the default exported function from ./src/redux.js ,i.e, typeof ./src/redux.js console.log( typeof( <Provider store={store}> <ConnectReduxApp /> ...
