SSR App: Seeing React Warning "Extra attributes from the server: data-from-server"
See original GitHub issueHi,
First of all want to thank you for this great component 🥇. The issue I am seeing is when using this component in a isomorphic application, I am seeing this warning in console.
Warning: Extra attributes from the server: data-from-server
Inspecting the DOM for the component reveals data-from-server=yes
. Looks like the warning comes from the React hydrate method when there as mismatch in the Server vs Client DOM tree?
NOTE: I am not initializing initSimpleImg(...)
, simply using the documented props:
<SimpleImg
animationDuration={1}
src="https://.../images/hero/hp_main_banner_960.png"
srcSet="https://.../images/hero/hp_main_banner_480.png 480w, ...."
sizes="(min-width: 480px) 480px, ...."
alt="An illustration"
/>
Is there unique steps to follow when using in isomorphic web applications?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Seeing React Warning "Extra attributes from the server ...
The issue I am seeing is when using this component in a isomorphic application, I am seeing this warning in console. Warning: Extra...
Read more >How to fix 'Extra attributes from the server: style' warning in ...
I'm using LastPass so I tried turning it off and running the app again, and that seems to have solved the issue.
Read more >Building Forms with Next.js
Learn how to create forms with Next.js, from the form HTML element to advanced concepts with React.
Read more >Using componentDidUpdate in React
In this article we will see how to use the componentDidUpdate function in React components to respond to changes. This can be external...
Read more >React Basics - GitHub Pages
On the local server (http://localhost:3000) you can see a simple React app displaying a “hello ... Custom attributes are supported natively in React...
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
@bluebill1049 it is good to go! thanks @revskill10 ⚔️
hey @revskill10,
thanks for you suggestion and contribution. i think as long as your fix will resolve the server/client mis-match, then we are good. keep it simple and beautiful 👍
cheers bill