CodeZettaInterview Hub

Vue.js · Composition API · Junior · Comparison

How do provide/inject work with Composition API?

Short Interview Answer

provide(key, value) in ancestor; inject(key) in descendants; can be reactive if value is.

Detailed Explanation

Prefer explicit props for public component APIs; provide/inject for app-level concerns.

Did you know this answer?