isClient
Checks if the current JavaScript runtime is running on the browser.
Used to run browser-specific logics.
Example
if (isClient()) {
// Guarantees to be run on the client-side
doSomethingInBrowser();
}
Checks if the current JavaScript runtime is running on the browser.
Used to run browser-specific logics.
if (isClient()) {
// Guarantees to be run on the client-side
doSomethingInBrowser();
}