MCPcopy Create free account
hub / github.com/tomchentw/react-google-maps / componentDidMount

Method componentDidMount

src/withScriptjs.jsx:48–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 }
47
48 componentDidMount() {
49 const { loadingState } = this.state
50 if (loadingState !== LOADING_STATE_NONE || !canUseDOM) {
51 return
52 }
53 this.setState({
54 loadingState: LOADING_STATE_BEGIN,
55 })
56 // Don't load scriptjs as a dependency since we do not want this module be used on server side.
57 // eslint-disable-next-line global-require
58 const scriptjs = require(`scriptjs`)
59 const { googleMapURL } = this.props
60 scriptjs(googleMapURL, this.handleLoaded)
61 }
62
63 componentWillUnmount() {
64 this.isUnmounted = true

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected