2.0.0 • Published 6 months ago
mobx-wouter v2.0.0
mobx-wouter
MobX integration with Wouter
What package has
PageViewModelBase
, PageViewModel
Simple ViewModel
wrapper for pages
Usage:
import { PageViewModelBase } from 'mobx-wouter';
class HomePageVM extends PageViewModelBase<{ pathParam: string }> {
@observable
accessor value = 'value';
mount() {
super.mount();
document.title = 'Home';
// do something
}
}
withPageViewModel()
HOC for integration PageViewModel
with view component of React
Usage:
import { ViewModelProps } from 'mobx-view-model';
import { withPageViewModel } from 'mobx-wouter';
const HomePageView = observer(({ model }: ViewModelProps<HomePageVM>) => {
return <div>{`render value - ${model.value}`}</div>
})
export const HomePage = withPageViewModel(HomePageVM)(HomePageView);
withLazyPageViewModel()
Same as withPageViewModel()
but with lazy loading view and view model
MobxRouter
Router for client navigation
MobxLocation
, MobxHistory
, QueryParams
and etc
Exports from mobx-location-history
Usage
import { MobxRouter, MobxLocation, MobxHistory, QueryParams } from "mobx-wouter";
const router = new MobxRouter({
history: //, new MobxLocation()
location: //, new MobxHistory()
queryParams: //, new QueryParams(),
abortSignal: //
})
2.0.0
6 months ago
1.2.32
7 months ago
1.2.31
7 months ago
1.2.30
7 months ago
1.2.29
7 months ago
1.2.28
7 months ago
1.2.27
7 months ago
1.2.26
7 months ago
1.2.25
7 months ago
1.2.24
7 months ago
1.2.23
7 months ago
1.2.22
7 months ago
1.2.21
7 months ago
1.2.20
7 months ago
1.2.19
7 months ago
1.2.18
7 months ago
1.2.17
7 months ago
1.2.15
7 months ago
1.2.14
7 months ago
1.2.13
7 months ago
1.2.12
7 months ago
1.2.11
7 months ago
1.2.10
7 months ago
1.2.9
7 months ago
1.2.8
7 months ago
1.2.7
7 months ago
1.2.6
8 months ago
1.2.5
8 months ago
1.2.4
8 months ago
1.2.3
8 months ago
1.2.2
8 months ago
1.2.1
8 months ago
1.2.0
8 months ago
1.1.3
8 months ago
1.1.2
8 months ago
1.1.1
9 months ago
1.1.0
9 months ago
1.0.0
9 months ago
0.0.2
9 months ago
0.0.1
9 months ago