Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 503 Bytes

README.md

File metadata and controls

34 lines (25 loc) · 503 Bytes

omi-lazyload

Simple Lazyload Library for Omi

Install

npm install omi-lazyload

Usage

import  { render, define, WeElement } from 'omi'
import 'omi-lazyload'

define('my-app', class extends WeElement {
  render() {
    return (
      <div class="main">
        <omi-lazyload>
          <img src="https://github.com/Tencent/omi/blob/master/assets/omi-logo.svg" />
        </omi-lazyload>
      </div>
    )
  }
})

render(<my-app />, 'body')

License

MIT © LeeHyungGeun