You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently exploring this lib (3.2.2) with next (14.2.4).
Testing it in the app router I get undefined for my env on the server but it works on the client. This throws an hydration error...
Here is my code:
layout.tsx
import React from 'react';
import { EnvScript } from 'next-runtime-env';
import { unstable_noStore as noStore } from 'next/cache';
export default function RootLayout({ children }: { children: React.ReactNode }) {
noStore();
return (
<html lang="sv" className="no-js">
<head>
<EnvScript
env={{
NEXT_PUBLIC_FOO: 'VAL_NEXT_PUBLIC_FOO',
}}
/>
</head>
<body>{children}</body>
</html>
);
}
Hi,
I'm currently exploring this lib (3.2.2) with next (14.2.4).
Testing it in the app router I get undefined for my env on the server but it works on the client. This throws an hydration error...
Here is my code:
layout.tsx
component on test route:
The text was updated successfully, but these errors were encountered: