MCPcopy Create free account
hub / github.com/shoutem/theme / componentDidUpdate

Method componentDidUpdate

src/connectStyle.js:150–166  ·  view source on GitHub ↗
(prevProps)

Source from the content-addressed store, hash-verified

148 }
149
150 componentDidUpdate(prevProps) {
151 const styleNames = this.resolveStyleNames(this.props);
152
153 if (this.shouldRebuildStyle(prevProps, styleNames)) {
154 const resolvedStyle = this.resolveStyle(
155 this.context,
156 this.props,
157 styleNames,
158 );
159
160 this.setState({
161 style: resolvedStyle.componentStyle,
162 childrenStyle: resolvedStyle.childrenStyle,
163 styleNames,
164 });
165 }
166 }
167
168 setNativeProps(nativeProps) {
169 if (!this.isRefDefined()) {

Callers

nothing calls this directly

Calls 3

resolveStyleNamesMethod · 0.95
shouldRebuildStyleMethod · 0.95
resolveStyleMethod · 0.95

Tested by

no test coverage detected