mobx: update layout
This commit is contained in:
parent
73c2567269
commit
651e771548
10
mobx.md
10
mobx.md
|
@ -1,6 +1,8 @@
|
||||||
---
|
---
|
||||||
title: Mobx
|
title: Mobx
|
||||||
category: JavaScript libraries
|
category: JavaScript libraries
|
||||||
|
layout: 2017/sheet
|
||||||
|
updated: 2017-05-14
|
||||||
---
|
---
|
||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
@ -19,7 +21,7 @@ class Page {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Actions
|
### Actions
|
||||||
|
|
||||||
```js
|
```js
|
||||||
class Page {
|
class Page {
|
||||||
|
@ -30,7 +32,7 @@ class Page {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Plain objects
|
### Plain objects
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const person = observable({
|
const person = observable({
|
||||||
|
@ -47,6 +49,8 @@ temp.observe(...)
|
||||||
|
|
||||||
## Reactions
|
## Reactions
|
||||||
|
|
||||||
|
### Importing
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import {autorun, autorunAsync, when} from 'mobx'
|
import {autorun, autorunAsync, when} from 'mobx'
|
||||||
```
|
```
|
||||||
|
@ -91,6 +95,8 @@ render () {
|
||||||
|
|
||||||
## React
|
## React
|
||||||
|
|
||||||
|
### mobx-react
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { observer } from 'mobx-react'
|
import { observer } from 'mobx-react'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue