1.0.5 • Published 4 years ago

impr v1.0.5

Weekly downloads
5
License
ISC
Repository
github
Last release
4 years ago

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(clear Observer)