mobx: update layout

This commit is contained in:
Rico Sta. Cruz 2018-05-14 12:45:45 +08:00
parent 73c2567269
commit 651e771548
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 8 additions and 2 deletions

10
mobx.md
View File

@ -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'