Skip to content

React component measures time the first meaningful paint.

License

Notifications You must be signed in to change notification settings

AndreyGladkov/react-fmp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

React component measures time the first meaningful paint.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published