MCPcopy Create free account
hub / github.com/codecombat/codecombat / afterRender

Method afterRender

app/views/core/RootComponent.js:22–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 }
21
22 afterRender () {
23 if (this.vueComponent) {
24 this.$el.find('#site-content-area').replaceWith(this.vueComponent.$el)
25 } else {
26 if (this.vuexModule) {
27 if (!_.isFunction(this.vuexModule)) {
28 throw new Error('@vuexModule should be a function')
29 }
30 store.registerModule('page', this.vuexModule())
31 }
32
33 this.vueComponent = new this.VueComponent({
34 el: this.$el.find('#site-content-area')[0],
35 propsData: this.propsData,
36 store
37 })
38
39 window.rootComponent = this.vueComponent // Don't use this in code! Just for ease of development
40 }
41
42 return super.afterRender(...arguments)
43 }
44
45 destroy () {
46 if (this.vuexModule) {

Callers

nothing calls this directly

Calls 1

vuexModuleMethod · 0.80

Tested by

no test coverage detected