Modal breaks SSR
See original GitHub issueHello,
Using Modal
with SSR specifically using next.js breaks SSR for some reason. Any ideas why that might be? I am not sure if it is specific to semantic or next.js
Steps
git clone https://github.com/kolpav/semantic-ui-ssr-bug
cd semantic-ui-ssr-bug
yarn
yarn dev
Expected Result
Should not break SSR
Actual Result
Breaks SSR
Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
(client) v data-reactid="2"><span data-reactid="3
(server) v data-reactid="2"><!-- react-empty: 3 -
Version
0.67.2
Testcase
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
[fix] Rendering modal outside app route breaks server side ...
It is possible to work around by adding renderToPortal={false} to Modal components, but it does not work by default. Also this workaround will ......
Read more >Portals - React
A typical use case for portals is when a parent component has an overflow: hidden or z-index style, but you need the child...
Read more >No SSR React component - MUI Base
No-SSR is a utility component that prevents its children from being rendered on the server. This component can be useful in a variety...
Read more >Server-side rendering with Vue and Nuxt.js - LogRocket Blog
Learn about server-side rendering (SSR) and client-side rendering (CSR), how its evolved, and how to use implement it with Nuxt.js and Vue.
Read more >Basic Features: Fast Refresh - Next.js
js and Modal.js import theme.js , editing theme.js will update both components. Finally, if you edit a file that's imported ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any update on this? Experiencing exactly the same issue on version 0.75.1
Hey folks, thanks for showing support. It would be most helpful if you could use the react button opposed to posting a comment. Comments trigger emails and notifications for us.
The reactions are also a little more clear as to what you are giving a thumbs up to.