mercredi 11 septembre 2019

Not able to use Redux inside React/Ember project

My project is built in Emberjs and i'm trying to integrate React and Redux in my project. I'm able to use react inside the project with this helpful addon:

https://github.com/alexlafroscia/ember-react-components

Now i'm trying to add Redux for my state management, everything is okay until i use connect function to connect my component to store.

const mapStateToProps = {};
export default connect(null, {fetchData})(ReactComponent)

Its giving following error in console:

route.js:62 TypeError: C is not a constructor
    at Object._ClassMixinProps.create (core_object.js:282)
    at FactoryManager.create (container.js:439)
    at Proxy.create (container.js:197)
    at CurlyComponentManager.create (curly.js:155)
    at runtime.js:1671
    at AppendOpcodes.evaluate (runtime.js:70)
    at VM.next (runtime.js:7246)
    at TemplateIterator.next (runtime.js:7317)
    at RootState.render (renderer.js:60)
    at TransactionRunner.runInTransaction (ember-metal.js:826)

I'm following this simple tutorial to understand Redux: https://www.youtube.com/watch?v=93p3LxR9xfM

Do anyone have idea how i can resolve this issue?

Thanks for helping!!




Aucun commentaire:

Enregistrer un commentaire