2.0.0 • Published 5 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
5 months ago
1.2.32
6 months ago
1.2.31
6 months ago
1.2.30
6 months ago
1.2.29
6 months ago
1.2.28
6 months ago
1.2.27
6 months ago
1.2.26
6 months ago
1.2.25
6 months ago
1.2.24
6 months ago
1.2.23
6 months ago
1.2.22
6 months ago
1.2.21
6 months ago
1.2.20
6 months ago
1.2.19
6 months ago
1.2.18
6 months ago
1.2.17
6 months ago
1.2.15
6 months ago
1.2.14
6 months ago
1.2.13
6 months ago
1.2.12
6 months ago
1.2.11
6 months ago
1.2.10
6 months ago
1.2.9
6 months ago
1.2.8
6 months ago
1.2.7
7 months ago
1.2.6
7 months ago
1.2.5
7 months ago
1.2.4
7 months ago
1.2.3
7 months ago
1.2.2
7 months ago
1.2.1
7 months ago
1.2.0
7 months ago
1.1.3
7 months ago
1.1.2
7 months ago
1.1.1
8 months ago
1.1.0
8 months ago
1.0.0
8 months ago
0.0.2
8 months ago
0.0.1
8 months ago