Render the children only before the JS has loaded client-side. Use an optional fallback component for once the JS has loaded.
Example: Render a hidden input to identify if the user has JS.
return ( <ServerOnly fallback={<FakeChart />}> {() => <Chart />} </ServerOnly>); Copy
return ( <ServerOnly fallback={<FakeChart />}> {() => <Chart />} </ServerOnly>);
Render the children only before the JS has loaded client-side. Use an optional fallback component for once the JS has loaded.
Example: Render a hidden input to identify if the user has JS.