1.0.5 • Published 4 years ago
impr v1.0.5
IMPR
Introduction
1. Your components only report once
2. You can use other report function
const send = () => {
fetch(url, {})
}
logger={send || other}
3
return <Impr>
<div>
<Impr>
{children}
</Impr>
</div>
</Impr>
how to use
import Impr from './Impr'
return <Impr logger={logger} trackingInfo={trackingInfo}>
{children}
</Impr>
params
{
"logger"--->"how to report",
"trackingInfo"-->"data",
"threshold"-->"like this name"
}
:warning: know:
You must be set
callback
(clearObserver
)