MCPcopy
hub / github.com/TanStack/query / beforeCreate

Function beforeCreate

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

Source from the content-addressed store, hash-verified

78 if (isVue2) {
79 app.mixin({
80 beforeCreate() {
81 // HACK: taken from provide(): https://github.com/vuejs/composition-api/blob/master/src/apis/inject.ts#L30
82 if (!this._provided) {
83 const provideCache = {}
84 Object.defineProperty(this, '_provided', {
85 get: () => provideCache,
86 set: (v) => Object.assign(provideCache, v),
87 })
88 }
89
90 this._provided[clientKey] = client
91
92 if (process.env.NODE_ENV === 'development') {
93 if (this === this.$root && options.enableDevtoolsV6Plugin) {
94 setupDevtools(this, client)
95 }
96 }
97 },
98 })
99 } else {
100 app.provide(clientKey, client)

Callers

nothing calls this directly

Calls 1

setupDevtoolsFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…