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

Lifecycle hooks are not called in custom elements #1117

Closed
zhengl opened this issue Jan 18, 2018 · 0 comments
Closed

Lifecycle hooks are not called in custom elements #1117

zhengl opened this issue Jan 18, 2018 · 0 comments
Labels

Comments

@zhengl
Copy link

zhengl commented Jan 18, 2018

With the following code, oncreate and ondestory are not called when customElements: true is specified in compiler.

<script>
	export default {
		oncreate() {
			console.log('oncreate')
		},

		ondestroy() {
			console.log('ondestroy')
		},
	};
</script>

However, oncreate is called by set instead.

Thanks for your help in advance!

@arxpoetica arxpoetica added the bug label Jan 19, 2018
Rich-Harris added a commit that referenced this issue Feb 9, 2018
Rich-Harris added a commit that referenced this issue Feb 10, 2018
in custom elements, call oncreate in connectedCallback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants