Wondering what’s next for npm?Check out our public roadmap! »

lit-element-re-render

1.0.1 • Public • Published

LitElement component KimDo7

What is this repository for?

  • Quick summary: Lit Element has a lazy rendering to improve performance; however, the developer's skill requires a deep understanding of memory allocation. With this extremely lightweight library, it will re-render the only request nested subcomponent. The main benefit of this library, it only re-render the component needed without re-render the whole application.

  • Version 1.0.0

Installation

npm i lit-element-re-render --save

Then

import { reRenderSubComponent } from "lit-element-re-render";

Sample 1

<!-- HTML -->
<grand-parent>
  <parent>
    <child></child>
  </parent>
</grand-parent>
// LitELement from grand-parent level
// this is current grand-parent 
reRenderSubComponent(this, "parent child");

Sample 2

<!-- HTML -->
<grand-parent>
  <parent id='parent-id'>
    <child></child>
  </parent>
</grand-parent>
// LitELement from grand-parent level
// Note: it uses recursive querySelector
 
reRenderSubComponent(this, "#parent-id child");

Sample 3

<!-- HTML -->
<grand-parent>
  <parent class='parent-class'>
    <child></child>
  </parent>
</grand-parent>
// LitELement from grand-parent level
// Note: it uses recursive querySelector
// It may works if it is a unique html class or it is the first one
reRenderSubComponent(this, ".parent-class child");

Who do I talk to?

  • Repo owner or admin: Kim Do
  • Linkedin: @kimdo7

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Install

npm i lit-element-re-render

DownloadsWeekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

3.95 kB

Total Files

3

Last publish

Collaborators

  • avatar