Using babel-plugin-inline-react-svg
from within my next.js
app, I'm importing some SVGs into my React v16.0.0
component like so.
import React from 'react';
import Close from './close.svg';
import Chevron from './right.svg';
import EmptyCart from './empty.svg';
const Component = props => (
<div>
<Close />
<EmptyCart />
<Chevron />
</div>
);
When I run that code, the page is rendered with the 3 SVGs all being the same, like this:
Whichever of the SVGs I render first seems to take over all of the other ones. If I put <EmptyCart />
first, they'll all be cart icons. But here's the real kicker: When I inspect the DOM, the SVGs seem to all be correct (they're all completely different from each other).
Anyone seen this before? How is this even possible for the DOM to say one thing but the browser to render another thing?