Make the dev-server also support client side rendering with output: export
#48279
vaibhavshn
started this conversation in
Ideas
Replies: 3 comments 3 replies
-
Same issue here, pure SPA app. I think your work-around works for |
Beta Was this translation helpful? Give feedback.
0 replies
-
Also to clarify: any config other than |
Beta Was this translation helpful? Give feedback.
0 replies
-
Wouldn't wrapping root layout in
Make the whole app client side rendered? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
When you have
output: export
set innext.config.js
, the dev-server should client side render all components by default, instead of server rendering them.Non-Goals
No response
Background
Since the new react.dev docs suggest using Next instead of CRA, this will be helpful for beginners in React as they don't have to deal with hydration errors when just starting to learn React. Also if you just want a client side app, you don't have to write a lot of boilerplate code.
Proposal
While creating a fully static client side app is possible in Next by setting
output:export
, you still have to tell Next to disable SSR for every component with thedynamic()
function, and you have to keep writing that everywhere - or you can do something like this in_app.jsx
so all components are client side rendered:I think a CSA mode will be amazing, it can be enabled when you have
output: export
set which is already there in next's config and you can make the dev server client side render all components.Let me know what you folks think about this.
Beta Was this translation helpful? Give feedback.
All reactions