Skip to content

provider/inject not work between parent and child component in vue3 #35

Open
@imhuntun

Description

@imhuntun

Describe the bug
I pass in a component by templete, and the data provided by the outermost component cannot be read by inject in the child component.

in parent component:
provide('setting', {a:1,b:1});

in child component:
const setting = inject('setting'); // get nothing

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions