Replace mobx-state-tree with mobx and get a basic home feed rendering
This commit is contained in:
parent
6b32698b3e
commit
dc55f58004
20 changed files with 534 additions and 273 deletions
|
@ -1,9 +1,33 @@
|
|||
import React, {useState, useEffect} from 'react'
|
||||
import {RootStore, setupState, RootStoreProvider} from './state'
|
||||
import moment from 'moment'
|
||||
import {RootStoreModel, setupState, RootStoreProvider} from './state'
|
||||
import * as Routes from './view/routes'
|
||||
|
||||
moment.updateLocale('en', {
|
||||
relativeTime: {
|
||||
future: 'in %s',
|
||||
past: '%s ago',
|
||||
s: 'a few seconds',
|
||||
ss: '%ds',
|
||||
m: 'a minute',
|
||||
mm: '%dm',
|
||||
h: 'an hour',
|
||||
hh: '%dh',
|
||||
d: 'a day',
|
||||
dd: '%dd',
|
||||
w: 'a week',
|
||||
ww: '%dw',
|
||||
M: 'a month',
|
||||
MM: '%dmo',
|
||||
y: 'a year',
|
||||
yy: '%dy',
|
||||
},
|
||||
})
|
||||
|
||||
function App() {
|
||||
const [rootStore, setRootStore] = useState<RootStore | undefined>(undefined)
|
||||
const [rootStore, setRootStore] = useState<RootStoreModel | undefined>(
|
||||
undefined,
|
||||
)
|
||||
|
||||
// init
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue