Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

what is computed in mobx

import {observable, computed} from 'mobx'

class Page {
  @observable title = ''
  @observable published = false
  @observable author = null

  @computed get authorName () {
    return this.author || 'Anonymous'
  }
}
Source by devhints.io #
 
PREVIOUS NEXT
Tagged: #computed #mobx
ADD COMMENT
Topic
Name
2+4 =