swap MobX to Redux -> delete MobX services

develop
TBS093A 2020-07-20 22:44:54 +02:00
parent 2500d99e99
commit 3401c16b2b
9 changed files with 75 additions and 1 deletions

38
package-lock.json generated
View File

@ -11790,6 +11790,26 @@
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
}, },
"mobx": {
"version": "5.15.4",
"resolved": "https://registry.npmjs.org/mobx/-/mobx-5.15.4.tgz",
"integrity": "sha512-xRFJxSU2Im3nrGCdjSuOTFmxVDGeqOHL+TyADCGbT0k4HHqGmx5u2yaHNryvoORpI4DfbzjJ5jPmuv+d7sioFw=="
},
"mobx-react": {
"version": "4.4.3",
"resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-4.4.3.tgz",
"integrity": "sha1-uqnsQRZe41rnud8ZvKEBkPNvEX4=",
"requires": {
"hoist-non-react-statics": "^2.3.1"
},
"dependencies": {
"hoist-non-react-statics": {
"version": "2.5.5",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz",
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
}
}
},
"moment": { "moment": {
"version": "2.27.0", "version": "2.27.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz", "resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz",
@ -14385,6 +14405,24 @@
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
}, },
"react-mobx": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/react-mobx/-/react-mobx-0.0.4.tgz",
"integrity": "sha512-dFvnbL3JryzmNkVPfb5klhGXFsEPD+X1yNHIOiLNTGFLXNHB7kLMghPHjenilKBMqg6ZIJ2mmo/9u6HBvBBUQg==",
"requires": {
"mobx": "^3.5.1",
"mobx-react": "^4.4.2",
"react": "^16.2.0",
"react-dom": "^16.2.0"
},
"dependencies": {
"mobx": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/mobx/-/mobx-3.6.2.tgz",
"integrity": "sha512-Dq3boJFLpZEvuh5a/MbHLUIyN9XobKWIb0dBfkNOJffNkE3vtuY0C9kSDVpfH8BB0BPkVw8g22qCv7d05LEhKg=="
}
}
},
"react-reconciler": { "react-reconciler": {
"version": "0.25.1", "version": "0.25.1",
"resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.25.1.tgz", "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.25.1.tgz",

View File

@ -14,11 +14,13 @@
"gatsby-plugin-sharp": "^2.6.0", "gatsby-plugin-sharp": "^2.6.0",
"gatsby-source-filesystem": "^2.3.0", "gatsby-source-filesystem": "^2.3.0",
"gatsby-transformer-sharp": "^2.5.0", "gatsby-transformer-sharp": "^2.5.0",
"mobx": "^5.15.4",
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",
"react": "^16.12.0", "react": "^16.12.0",
"react-dom": "^16.12.0", "react-dom": "^16.12.0",
"react-helmet": "^6.0.0" "react-helmet": "^6.0.0",
"react-mobx": "0.0.4"
}, },
"devDependencies": { "devDependencies": {
"prettier": "2.0.5" "prettier": "2.0.5"

15
src/pages/app.js 100644
View File

@ -0,0 +1,15 @@
import React from 'react'
import
import { observer } from 'react-mobx'
import { render } from 'node-sass'
import Guest from './../stores/guest'
@observer
class App {
render() {
<div></div>
}
}

View File

@ -0,0 +1,19 @@
import { observable, computed } from 'mobx'
class Guest {
@observable id = ''
@observable ip = ''
@observable city = ''
@observable country = ''
}
class User {
@observable id = -1
@observable username = ''
@observable email = ''
@observable ip = ''
@observable city = ''
@observable country = ''
@observable token = ''
}