Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import { Component, Element } from '@stencil/core';
  2. import { Lazy, LazyHost } from 'st-lazy';
  3.  
  4. @Component({ tag: 'lazy-component', shadow: true })
  5. export class LazyComponent {
  6.  
  7. @LazyHost() @Element() host;
  8.  
  9. @Lazy()
  10. someMethod() { console.log("someMethod was called because user scrolled to LazyComponent"); }
  11.  
  12. render() { return <div>Hello, World!</div>; }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement