MCPcopy Create free account
hub / github.com/TanStack/query / beforeCreate

Function beforeCreate

packages/vue-query/src/vueQueryPlugin.ts:133–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

131 if (isVue2) {
132 app.mixin({
133 beforeCreate() {
134 // HACK: taken from provide(): https://github.com/vuejs/composition-api/blob/master/src/apis/inject.ts#L30
135 if (!this._provided) {
136 const provideCache = {}
137 Object.defineProperty(this, '_provided', {
138 get: () => provideCache,
139 set: (v) => Object.assign(provideCache, v),
140 })
141 }
142
143 this._provided[clientKey] = client
144
145 if (process.env.NODE_ENV === 'development') {
146 if (this === this.$root && options.enableDevtoolsV6Plugin) {
147 setupDevtools(this, client)
148 }
149 }
150 },
151 })
152 } else {
153 app.provide(clientKey, client)

Callers

nothing calls this directly

Calls 1

setupDevtoolsFunction · 0.90

Tested by

no test coverage detected