MCPcopy Create free account
hub / github.com/Lobos/react-ui / setData

Method setData

src/higherOrders/Fetch.js:122–132  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

120 }
121
122 setData (data) {
123 if (!this._isMounted) {
124 return;
125 }
126
127 if (data instanceof Error) {
128 this.setState({ fetchStatus: FETCH_FAILURE });
129 } else {
130 this.setState({ data: clone(data), fetchStatus: FETCH_SUCCESS });
131 }
132 }
133
134 render () {
135 const { data, ...others } = this.props;

Callers 1

fetchDataMethod · 0.95

Calls 1

cloneFunction · 0.85

Tested by

no test coverage detected