PropTypes:
Name | Type | Required | Description | Default |
---|---|---|---|---|
children |
func | Yes | ||
margin |
string | No | ||
height |
number | No |
Components
This component can be used to load some DOM just before it scrolls into the screen. Currently, it does not support unloading. The margin
prop is passed to IntersectionObserver
.
Example
import { WithLazy } from '@quintype/components';
<WithLazy margin="50px">{() =>
<SomeHeavyComponent />
}</WithLazy>
Name | Type | Required | Description | Default |
---|---|---|---|---|
children |
func | Yes | ||
margin |
string | No | ||
height |
number | No |