Electron Forge template with mobx-react observers

I have recently started playing around with Electron Forge and I think it is an awesome tool. I have also been doing some work with the mobx-react package and have been using the observer feature. Creating an electron-forge project based on the react template, I modify the app.jsx file to look like import React from 'react';import {observer} from 'mobx-react';@observer export default class App extends React.Component { render() { return (<div> <h2>Welcome to React!</h2> </div>); }}When I run the application ...Read more

React mobx does not inject stores properly

I have implemented this but the store has no values (all undefined):This is the store:export default class AppState { // Is authenticated @observable authenticated; @action get authenticated() { return this.authenticated; } doSomethingWithNoDecorator() { return this.authenticated; } }This is index.js:const stores = { AppState};const renderApp = Component => { render( <AppContainer> <Provider { ...stores }> <Router> // Routes ...Read more

Mobx-state-tree Clone also changes the original item?

I have the following model snippet:nodeOrigin: types.maybe(types.reference(nodeState)),node: types.maybe(nodeState),And I start editing a node by the following function (the original node i saved so it can be used in a undo() function):startEditing(node) { self.nodeOrigin = node; self.node = clone(node);}And in my render method the editing node is used like this:<form className="form"> <TextField margin='dense' value={getStore().node["name"]} /></form>But when I change the name and print the content of both the node ...Read more