Replace mobx-state-tree with mobx and get a basic home feed rendering

This commit is contained in:
Paul Frazee 2022-07-19 15:37:24 -05:00
parent 6b32698b3e
commit dc55f58004
20 changed files with 534 additions and 273 deletions

View file

@ -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(() => {