render-on-demand
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

render-on-demand

React component that returns children once after DOM render request.

Puppeteer tests @ specs/index.spec.ts

Example

Source

<style>{`
  input:not(:checked) ~ * {
    display: none;
  }
`}</style>
<input type="checkbox"/>
<RenderOnDemand>
  <div className="child">a</div>
  <div className="child">b</div>
</RenderOnDemand>

.child will not appear in DOM until input is checked for the first time.

<style>
  input:not(:checked) ~ * {
    display: none;
  }
</style> 
<input type="checkbox">
<div></div>

Readme

Keywords

none

Package Sidebar

Install

npm i render-on-demand

Weekly Downloads

1

Version

0.0.5

License

MIT

Unpacked Size

10.2 kB

Total Files

8

Last publish

Collaborators

  • kirmas