Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component, Element } from '@stencil/core';
- import { Lazy, LazyHost } from 'st-lazy';
- @Component({ tag: 'lazy-component', shadow: true })
- export class LazyComponent {
- @LazyHost() @Element() host;
- @Lazy()
- someMethod() { console.log("someMethod was called because user scrolled to LazyComponent"); }
- render() { return <div>Hello, World!</div>; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement