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.

SSR App: Seeing React Warning "Extra attributes from the server: data-from-server"

See original GitHub issue

Hi,

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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
rhernand3zcommented, Apr 2, 2019

@bluebill1049 it is good to go! thanks @revskill10 ⚔️

1reaction
bluebill1049commented, Mar 30, 2019

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

Read more comments on GitHub >

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

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