Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add electron-redux module #603

Conversation

dustintownsend
Copy link
Collaborator

This uses the proposed changed in PR #602.
I have the need for syncing the state between main and renderer, so this is my first pass. Based on the discussion from Issue #108 I decided to try https://github.com/hardchor/electron-redux/ first. I may do another PR for redux-electron-store and an alternative.

@burkhardr can you look over this and see if I got any of the implementation wrong? I based it on your timesheets repo.

@hardchor
Copy link

hardchor commented Dec 9, 2016

@dustintownsend Hey. Nothing glaringly obvious I can spot.
Most importantly: does it work? 😉

@hardchor
Copy link

hardchor commented Dec 9, 2016

Might be worth adding some examples of, e.g. async actions, local or aliased actions.

@dustintownsend
Copy link
Collaborator Author

@hardchor do you have any insight into why the test are failing?

It is failing at replyActionMain.js at ipcMain.on. It seems that ipcMain is not importing. I assume its due to not being in electron but a test, but I don't know enough about testing to be 100%.

@jhen0409
Copy link
Member

It is failing at replyActionMain.js at ipcMain.on. It seems that ipcMain is not importing. I assume its due to not being in electron but a test, but I don't know enough about testing to be 100%.

#573 (comment) have provided a workaround, maybe we can migrate to electron-mocha (although we have #520), but it will broken test-watch (A reason is jprichardson/electron-mocha#18).

@hardchor
Copy link

If this is a unit test, you'll probably need to mock electron. It's slightly confusing that electron is now also the name of electron-prebuilt on npm, so whilst running tests, that'll probably be imported (rather than the actual electron helpers).

@dustintownsend
Copy link
Collaborator Author

I'm going to close this for now. I'm not sure this is a good fit for the boilerplate right now. I think it would be better as an optional add on.

@hardchor
Copy link

What are the core maintainer's thoughts? I could have another go at this once the jest PR is in.

/cc @jhen0409 @amilajack

@amilajack
Copy link
Member

I'm not very experienced with redux. @jhen0409 and @chentsulin may have more to say about this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants