MCPcopy Create free account
hub / github.com/jamiebuilds/create-react-context / componentDidMount

Method componentDidMount

src/implementation.js:143–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141 }
142
143 componentDidMount() {
144 if (this.context[contextProp]) {
145 this.context[contextProp].on(this.onUpdate);
146 }
147 let { observedBits } = this.props;
148 this.observedBits =
149 observedBits === undefined || observedBits === null
150 ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default
151 : observedBits;
152 }
153
154 componentWillUnmount() {
155 if (this.context[contextProp]) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected