Inferno: Improve the `inferno-redux` example in the README.md to include store

Created on 22 Sep 2016  路  14Comments  路  Source: infernojs/inferno

Hello,

Inferno+Redux example throws an exception:

app.bundle.js:194 Uncaught ReferenceError: store is not defined

Please check the attached file, there is a code for reproducing the issue. You may open the index.html inside the bin folder.

Thanks,
inferno-redux-example.zip

bug documentation

Most helpful comment

IMO example should be improved if it's not clear for people

All 14 comments

@ipeychev I believe this has been fixed in Inferno 1.0-alpha11. Are you using Inferno 1.0 or 0.7?

I'm using 0.7, what is pushed to NPM

@ipeychev can you please try Inferno 1.0-ahlpha11?

npm install --save inferno@alpha11
npm install --save inferno-dom@alpha11
npm install --save inferno-redux@alpha11

And whatever else you might use just do @alpha11.

If you use JSX:

npm install --save-dev babel-plugin-inferno@alpha11

No, it looks like it is not fixed in alpha11 :(

@iclanzan okay, I'll try and get a fix sorted tonight :)

Excuse me? 馃槢

I meant @ipeychev, sorry @iclanzan :)

I looked into this more and it's simply because we didn't define store in the example. I guess we should have included a demo store. We need to do this, I'll update this issue.

@trueadm it's not clear in the thread if this was indeed a bug in alpha11. I want to apply a temporary patch to get this going, can you describe what needs to be adjusted?

I'm noticing the context in the components aren't being populated with the store value.

@pinandtucker So in the example we don't create a store or any reducers to handle the changes. You'll need to create a reducer to to take any actions that are dispatched. In this case something that takes a type CHANGE_NAME

IMO example should be improved if it's not clear for people

Has this been done? @LukeSheard

@trueadm I wasn't sure if @pinandtucker wasn't going to submit a PR. I'll do it when I next get on.

Closed with #499

Was this page helpful?
0 / 5 - 0 ratings