This is a report for a bug of a server side rendering warning when using svgs in React 16
What is the current behavior?
We get the following warning when using an svg tag with a linearGradient attribute in one of our components:
Warning: Expected server HTML to contain a matching <linearGradient> in <defs>.
Since this is a server side warning, we have reproduced the warning on this repo with a very simple example of an svg tag:
https://github.com/lzcabrera/svg-SSR
Steps to reproduce
- clone repo
npm install
npm build
npm start
- Visit http://localhost:3000 on your browser
- Open the javascript console to see the warning
What is the expected behavior?
The expected behaviour is to have no warning when doing server side rendering, just like there is none when rendering on the client side.
This worked in React 15.6.1 as tested on branch v15 on the same repo above.
This is a report for a bug of a server side rendering warning when using svgs in React 16
What is the current behavior?
We get the following warning when using an svg tag with a linearGradient attribute in one of our components:
Warning: Expected server HTML to contain a matching <linearGradient> in <defs>.Since this is a server side warning, we have reproduced the warning on this repo with a very simple example of an svg tag:
https://github.com/lzcabrera/svg-SSR
Steps to reproduce
npm installnpm buildnpm startWhat is the expected behavior?
The expected behaviour is to have no warning when doing server side rendering, just like there is none when rendering on the client side.
This worked in React 15.6.1 as tested on branch v15 on the same repo above.