Skip to content

Commit

Permalink
repro
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn committed Nov 13, 2024
1 parent 15f3553 commit 6f8f90d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
6 changes: 4 additions & 2 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { NextConfig } from "next";
import type {NextConfig} from 'next';

const nextConfig: NextConfig = {
/* config options here */
experimental: {
dynamicIO: true
}
};

export default nextConfig;
18 changes: 18 additions & 0 deletions src/app/[locale]/Component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use client';

import {
useParams,
usePathname,
useSelectedLayoutSegment
} from 'next/navigation';

export default function Component() {
// All of these hooks fail during the build but
// work without an issue during development
console.log([
usePathname(), // fails
useParams(), // fails
useSelectedLayoutSegment() // fails
]);
return 'Component';
}
4 changes: 3 additions & 1 deletion src/app/page.tsx → src/app/[locale]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import Component from './Component';

export default function Home() {
return (
<main>
<div>Hello world!</div>
<Component />
</main>
);
}

0 comments on commit 6f8f90d

Please sign in to comment.