react-ssr-setup | React Starter Project with Webpack | Frontend Framework library
kandi X-RAY | react-ssr-setup Summary
kandi X-RAY | react-ssr-setup Summary
React Starter Project with Webpack 4, Babel 7, TypeScript, CSS Modules, Server Side Rendering, i18n and some more niceties
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-ssr-setup
react-ssr-setup Key Features
react-ssr-setup Examples and Code Snippets
Community Discussions
Trending Discussions on react-ssr-setup
QUESTION
I'm using material-ui
with SSR. I've set up the SSR machinery on my app according to the instructions on the material-ui
docs. It does work, but not without a rendering issue that so far has been very hard to debug. More details follow.
SSR + loading state (which causes the comp. in question to not render in one of the SSR rendering passes, more on that below) cause inconsistent ID in the className of a specific component that renders on the second SSR rendering pass but not on the first (because its rendering is conditioned to having the data available).
This causes the markup sent from the server to have a different CSS class name for this component, causing a visual inconsistency in when hydration happens, as you may see below:
SSRed component:
Hydrated component:
The actual class available in the DOM is:
...ANSWER
Answered 2020-Apr-28 at 02:20I spent some time trying to extract a minimal example as suggested by @Girish and ended up finding the issue.
It isn't related to material-ui
nor mst-gql
. It was related to a component being rendered outside a react-router
's .
I have a component that's basically a wrapper around
material-ui
's . It used to sit at the bottom of my main App component. Its display is controlled my some observed MST properties. Here's the JSX markup for my App component:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-ssr-setup
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page