{"_id":"@avent-ui/use-render-env","_rev":"2-fd2f9cd5bdf320f9124c16a9d6742c47","name":"@avent-ui/use-render-env","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.5":{"name":"@avent-ui/use-render-env","version":"1.0.5","keywords":["magnet","magnetic","avent-ui","avent"],"author":{"name":"Aathi Eswar S"},"license":"MIT","_id":"@avent-ui/use-render-env@1.0.5","maintainers":[{"name":"aathieswar","email":"aathi28082003@gmail.com"}],"homepage":"https://github.com/AathiEswar/avent-ui/blob/main/src/components/Magneto/README.md","bugs":{"url":"https://github.com/AathiEswar/avent-ui/issues"},"dist":{"shasum":"a69314b864f85727c42a34e334859bb043d074dd","tarball":"https://registry.npmjs.org/@avent-ui/use-render-env/-/use-render-env-1.0.5.tgz","fileCount":10,"integrity":"sha512-MFyxDv+reXkJils1fH6BxZo53B8/KYgNeChJmPM8UX7dsfGpheG4GOrMryDYymtHiCqK1cc9JlVIl1YV5mR81Q==","signatures":[{"sig":"MEUCIQCIymzUVwJIMa8o+JLi4g9fdQHYewxgL2Tmdyx1pzotywIgAnlpBHPcz/S4m1Wq9pCUHD9sfnJtrZLlLpAt3cB+Z9k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7671},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"eb8a6f559b5e9a1cd7a57b9f85a99d0a91ac6357","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepare":"npm run build"},"_npmUser":{"name":"aathieswar","email":"aathi28082003@gmail.com"},"repository":{"url":"git+https://github.com/AathiEswar/avent-ui.git#main","type":"git"},"_npmVersion":"9.8.1","description":"Hook to check server side or client side render along with loading state","directories":{},"_nodeVersion":"21.7.1","dependencies":{"react":"^18.3.1","react-dom":"^18.3.1"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.27.2","typescript":"^5.6.3","@types/react":"^18.3.12","@types/react-dom":"^18.3.1","@rollup/plugin-babel":"^6.0.4","rollup-plugin-postcss":"^4.0.2","@rollup/plugin-commonjs":"^28.0.1","rollup-plugin-typescript2":"^0.36.0","rollup-plugin-node-resolve":"^5.2.0","@rollup/plugin-node-resolve":"^15.3.0","rollup-plugin-peer-deps-external":"^2.2.4"},"_npmOperationalInternal":{"tmp":"tmp/use-render-env_1.0.5_1735103568024_0.7029956779353475","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@avent-ui/use-render-env","version":"1.0.1","keywords":["avent-ui","avent","hook","ssr","csr","loading"],"author":{"name":"Aathi Eswar S"},"license":"MIT","_id":"@avent-ui/use-render-env@1.0.1","maintainers":[{"name":"aathieswar","email":"aathi28082003@gmail.com"}],"homepage":"https://github.com/AathiEswar/avent-ui/blob/main/src/hooks/useRenderEnv/README.md","bugs":{"url":"https://github.com/AathiEswar/avent-ui/issues"},"dist":{"shasum":"d478cd41fe11ba8c84e9a7ef9acc8926f33d9049","tarball":"https://registry.npmjs.org/@avent-ui/use-render-env/-/use-render-env-1.0.1.tgz","fileCount":10,"integrity":"sha512-k7/SNj8YFw+76gErSDPTuCWQXyEDT2VXlar/ttl3amC1CLOjeaajGai6ZJaLptS8qKCf5bSGfvdx9ByVumyaeg==","signatures":[{"sig":"MEYCIQCx/nmw5PQDuPHqG0ge6z2CrABE3UWUYRiiWrIFfiXvVAIhANxo+Ff48LrxPSOEtl1nSiPRgdiW5ukM5fcMICExoyQW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7690},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"95098d480d611e763cb3b17f7e0f72646dc44fe7","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepare":"npm run build"},"_npmUser":{"name":"aathieswar","email":"aathi28082003@gmail.com"},"repository":{"url":"git+https://github.com/AathiEswar/avent-ui.git#main","type":"git"},"_npmVersion":"9.8.1","description":"Hook to indicate server side or client side render along with loading state","directories":{},"_nodeVersion":"21.7.1","dependencies":{"react":"^18.3.1","react-dom":"^18.3.1"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.27.2","typescript":"^5.6.3","@types/react":"^18.3.12","@types/react-dom":"^18.3.1","@rollup/plugin-babel":"^6.0.4","rollup-plugin-postcss":"^4.0.2","@rollup/plugin-commonjs":"^28.0.1","rollup-plugin-typescript2":"^0.36.0","rollup-plugin-node-resolve":"^5.2.0","@rollup/plugin-node-resolve":"^15.3.0","rollup-plugin-peer-deps-external":"^2.2.4"},"_npmOperationalInternal":{"tmp":"tmp/use-render-env_1.0.1_1735104367320_0.6536348826284741","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@avent-ui/use-render-env","version":"1.0.2","description":"Hook to indicate server side or client side render along with loading state","main":"dist/index.js","module":"dist/index.esm.js","types":"dist/index.d.ts","type":"module","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/AathiEswar/avent-ui.git#main"},"keywords":["avent-ui","avent","hook","ssr","csr","loading"],"author":{"name":"Aathi Eswar S"},"license":"MIT","bugs":{"url":"https://github.com/AathiEswar/avent-ui/issues"},"homepage":"https://github.com/AathiEswar/avent-ui/blob/main/src/hooks/useRenderEnv/README.md","dependencies":{"react":"^18.3.1","react-dom":"^18.3.1"},"devDependencies":{"@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^28.0.1","@rollup/plugin-node-resolve":"^15.3.0","@types/react":"^18.3.12","@types/react-dom":"^18.3.1","rollup":"^4.27.2","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.2","rollup-plugin-typescript2":"^0.36.0","typescript":"^5.6.3"},"_id":"@avent-ui/use-render-env@1.0.2","gitHead":"95098d480d611e763cb3b17f7e0f72646dc44fe7","_nodeVersion":"21.7.1","_npmVersion":"9.8.1","dist":{"integrity":"sha512-dMavDDGzhiDdllI6cTC3Xq7d9AdVlHj5Zm09yrdVfYL+28r5QJUSEVKMUf92gSuasMRPLUiMjncY9VGXfzeuAg==","shasum":"f56eac17c60bc099898064967f2da2e916905971","tarball":"https://registry.npmjs.org/@avent-ui/use-render-env/-/use-render-env-1.0.2.tgz","fileCount":10,"unpackedSize":7701,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtORhoVVE0S6jIohpmPj4z8asGChNBW9lNj1Zizt9QcAIhANDKXeWkEbb4b3R8w2j+d6+BoVu3rqn11LSt2YZWAIz/"}]},"_npmUser":{"name":"aathieswar","email":"aathi28082003@gmail.com"},"directories":{},"maintainers":[{"name":"aathieswar","email":"aathi28082003@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/use-render-env_1.0.2_1735105228777_0.8742172582468717"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-25T05:12:47.927Z","modified":"2024-12-25T05:40:29.164Z","1.0.5":"2024-12-25T05:12:48.200Z","1.0.1":"2024-12-25T05:26:07.511Z","1.0.2":"2024-12-25T05:40:28.993Z"},"bugs":{"url":"https://github.com/AathiEswar/avent-ui/issues"},"author":{"name":"Aathi Eswar S"},"license":"MIT","homepage":"https://github.com/AathiEswar/avent-ui/blob/main/src/hooks/useRenderEnv/README.md","keywords":["avent-ui","avent","hook","ssr","csr","loading"],"repository":{"type":"git","url":"git+https://github.com/AathiEswar/avent-ui.git#main"},"description":"Hook to indicate server side or client side render along with loading state","maintainers":[{"name":"aathieswar","email":"aathi28082003@gmail.com"}],"readme":"## AventUI - useRenderEnv \r\n\r\nThe **useRenderEnv** hook determines whether the component is being rendered on the server (SSR) or the client (CSR) and provides the current state, including a loading indicator. It uses **useEffect** to update the state once the component is hydrated on the client, ensuring the correct environment is reflected.\r\n\r\n### Installation\r\n\r\n### 1. Install the Component via npm:\r\n\r\n```jsx\r\nnpm install @avent-ui/useRenderEnv\r\n```\r\n\r\n### 3. Import the hook\r\n\r\n```jsx\r\nimport useRenderEnv from '@avent-ui/useRenderEnv';\r\n\r\n```\r\n### 4. Use it to find your Rendering Environment\r\n\r\n```jsx\r\n\r\n  // return boolean values\r\n  const { isLoading, isClient, isServer } = useRenderEnv();\r\n\r\n```\r\n### Properties\r\n\r\n| Prop         | Type       | Description                                       |\r\n|--------------|:----------:|---------------------------------------------------|\r\n| `isClient`    | `boolean`   | Indicates whether the component is being rendered on the client side |\r\n| `isServer`    | `boolean`   | Indicates whether the component is being rendered on the server side |\r\n| `isLoading`   | `boolean`   | Represents the loading state of the component, while data is fetched or app is hydrated |\r\n","readmeFilename":"README.md"}