is-next-server

1.0.0 • Public • Published

Check if next.js is running on server or client.

usage:

 
const isServer = require("is-next-server");
 
export default () => (
  if (isServer) {
    // server code.
  } else {
    // browser code.
  }
)

Dependents (0)

Package Sidebar

Install

npm i is-next-server

Weekly Downloads

5

Version

1.0.0

License

MIT

Last publish

Collaborators

  • aranajhonny