question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hello,

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

https://github.com/kolpav/semantic-ui-ssr-bug

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vilvadotcommented, Oct 25, 2017

Any update on this? Experiencing exactly the same issue on version 0.75.1

1reaction
levithomasoncommented, Sep 24, 2017

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.

image

The reactions are also a little more clear as to what you are giving a thumbs up to.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found