Layout is re-rendered when server action is called #66961
Labels
bug
Issue was opened via the bug report template.
create-next-app
Related to our CLI tool for quickly starting a new Next.js application.
Developer Experience
Issues related to Next.js logs, Error overlay, etc.
Performance
Anything with regards to Next.js performance.
Link to the code that reproduces this issue
https://github.com/festusyuma/next-issue-test
To Reproduce
start application in dev mode
navigate to url
click on the next buttom
log on layout will be printed for almost every click to indicate the layout was rendered again on the server
checkout to react-hook-form and repeat steps 1 - 4, same thing will happen when using react-hook-form
checkout to react-hook-form-api and repeat 1-4, this will not re-render the layout when calling external api
https://photos.app.goo.gl/L2faEJPxTYDUibeBA (video sample)
Current vs. Expected behavior
Expected behaviour: Layout should not be re-rendered when server action is called
Current behaviour: Layout is re-rendered when server action is called. this happens even when you have children and grandchildren layout. it is re-rendered from top to bottom
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.0.0: Thu May 30 21:30:12 PDT 2024; root:xnu-11215.0.31.511.2~1/RELEASE_ARM64_T6000 Available memory (MB): 16384 Available CPU cores: 10 Binaries: Node: 20.11.1 npm: 10.2.4 Yarn: 1.22.21 pnpm: 8.15.8 Relevant Packages: next: 14.2.4 // Latest available version is detected (14.2.4). eslint-config-next: 14.2.4 react: 18.3.1 react-dom: 18.3.1 typescript: 5.4.5 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
create-next-app, Developer Experience, Performance
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), Other (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered: