MCPcopy
hub / github.com/kenberkeley/react-demo / fetchMsgFromAPI

Method fetchMsgFromAPI

src/components/Msg/MsgDetail.js:32–37  ·  view source on GitHub ↗
(msgId)

Source from the content-addressed store, hash-verified

30 }
31
32 fetchMsgFromAPI (msgId) {
33 msgService.fetch({ msgId }).then(msg => {
34 if (!msg) return this.context.router.replace('/msg')
35 this.setState({ msg })
36 })
37 }
38
39 render () {
40 let { userData, delMsg } = this.props

Callers 1

componentWillMountMethod · 0.95

Calls 1

fetchMethod · 0.80

Tested by

no test coverage detected