Header tags missing when using useSearchParams in layout component in production #44868
Open
1 task done
Labels
template: bug
A user has filled out the bug report template. Issue needs triaging
Verify canary release
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 18.12.1
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.1.2-canary.8
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue
https://github.com/hamza512b/next-13-layout-issue
To Reproduce
Run
build
command and start the server:open the website on localhost and view the source code html file. It all messed and the header tags are missing.
Describe the Bug
When adding useSearchParams hook in layout file the html file get messed up. It looks like this. The header tags are missing and nothing is static is appended to the html file.
Expected Behavior
When adding useSearchParams hook in layout file, this should not happen instead header tags should be in the page source.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: