react-fmp

1.0.1 • Public • Published

react-fmp

React component measures time the first meaningful paint. First Meaningful Paint is the time it takes for a page's primary content to appear on the screen.

Props

  • labelSSR - type string
  • labelClient - type string
  • serverENV - type boolean Server environment flag.
  • send - type function Metrics send function. Argument - metric object:
    {
        renderTreeFormed - milliseconds,
        fmp - milliseconds,
        label - metric label
    }

Example

<ReactFMP
    labelSSR="labelSSR"
    labelClient="labelClient"
    serverENV={false}
    send={send}>
    <p>Primary content</p>
</ReactFMP>

Package Sidebar

Install

npm i react-fmp

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

111 kB

Total Files

7

Last publish

Collaborators

  • andreigladkov