Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue Example #128

Open
eulertour opened this issue Feb 28, 2020 · 1 comment
Open

Vue Example #128

eulertour opened this issue Feb 28, 2020 · 1 comment

Comments

@eulertour
Copy link

I couldn't figure out how to make this work with a vue (vue-cli) project. An example in the documentation would be extremely helpful.

@ZeeCoder
Copy link
Owner

Unfortunately I don't use vue, so not entirely sure how React's lifecycle methods translate there.
It shouldn't be too hard though, all you need to do is to create a Container instance when a vue component "mounted" with the actual dom element.
For react the key is componentDidMount:
https://github.com/ZeeCoder/container-query/blob/master/packages/react-container-query/src/ContainerQuery.js

The hook version would be even simpler, I just never got around to finish it:
18dd21e#diff-ff42a97c4f3571a1d6e2a2652d6be6fa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants