I was using React & fluxible & electron to work on on the app flows and it follows the standard react flow, i.e, component -> action -> store -> component
- click on some React components and this triggers an
Action
inActionCreators
Action
will dofs.readfileSync
and dispatch 'done' to thestore
- the React component will see the change in the
store
and renders thecomponent
again.
I failed at step 2 when I was about to read a file into the app. It gives me an error message saying:
Uncaught Error: process.binding is not supported
And I wonder if I did something wrong? Thanks.
The fs module will not work on the client. You should move file access to a place that is server only and expose it via an XHR endpoint. If you are using fluxible-plugin-fetchr you can do this within a service and call the service from your action creator.