A React Hook that runs a function only once when the component mounts.
See API for more details.
Click links below to view source on GitHub.
A function
that will be called when the component mounts, can be async.
strictOnce
option is NOT recommended as it damages the original intention of the Strict Mode of React 18.
A boolean
that indicates whether the handler should be called only once in Strict Mode of React 18. Default is false
.